
// this is autogenerated file, do not edit it.
#include "ficus/ficus.h"

struct _fx_Nt6option1N10Ast__typ_t_data_t;

static void _fx_free_Nt6option1N10Ast__typ_t(struct _fx_Nt6option1N10Ast__typ_t_data_t** dst);

struct _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t;

static void _fx_free_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t** dst);

struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t;

static void _fx_free_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t** dst);

struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t;

static void _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t** dst);

struct _fx_Nt6option1N10Ast__exp_t_data_t;

static void _fx_free_Nt6option1N10Ast__exp_t(struct _fx_Nt6option1N10Ast__exp_t_data_t** dst);

struct _fx_Nt10Hashmap__t2Si_data_t;

static void _fx_free_Nt10Hashmap__t2Si(struct _fx_Nt10Hashmap__t2Si_data_t** dst);

struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t;

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** dst);

struct _fx_Nt10Hashset__t1S_data_t;

static void _fx_free_Nt10Hashset__t1S(struct _fx_Nt10Hashset__t1S_data_t** dst);

struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t;

static void _fx_free_Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** dst);

struct _fx_Nt9Dynvec__t1S_data_t;

static void _fx_free_Nt9Dynvec__t1S(struct _fx_Nt9Dynvec__t1S_data_t** dst);

struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t;

static void _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t** dst);

struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t;

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** dst);

struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t;

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t** dst);

struct _fx_Nt11Set__tree_t1S_data_t;

static void _fx_free_Nt11Set__tree_t1S(struct _fx_Nt11Set__tree_t1S_data_t** dst);

struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t;

static void _fx_free_Nt11Set__tree_t1R9Ast__id_t(struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** dst);

struct _fx_N10Ast__typ_t_data_t;

static void _fx_free_N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t** dst);

struct _fx_N13Ast__binary_t_data_t;

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst);

struct _fx_N10Ast__exp_t_data_t;

static void _fx_free_N10Ast__exp_t(struct _fx_N10Ast__exp_t_data_t** dst);

struct _fx_N10Ast__pat_t_data_t;

static void _fx_free_N10Ast__pat_t(struct _fx_N10Ast__pat_t_data_t** dst);

struct _fx_N16Ast__env_entry_t_data_t;

static void _fx_free_N16Ast__env_entry_t(struct _fx_N16Ast__env_entry_t_data_t** dst);

struct _fx_N16Ast__defmodule_t_data_t;

static void _fx_free_N16Ast__defmodule_t(struct _fx_N16Ast__defmodule_t_data_t** dst);

typedef struct _fx_Nt6option1N10Ast__typ_t_data_t {
   int_ rc;
   union {
      struct _fx_N10Ast__typ_t_data_t* Some;
   } u;
} _fx_Nt6option1N10Ast__typ_t_data_t, *_fx_Nt6option1N10Ast__typ_t;

typedef struct _fx_LS_data_t {
   int_ rc;
   struct _fx_LS_data_t* tl;
   fx_str_t hd;
} _fx_LS_data_t, *_fx_LS;

typedef struct _fx_R7File__t {
   fx_cptr_t handle;
} _fx_R7File__t;

typedef struct _fx_N17Options__optval_t {
   int tag;
   union {
      bool OptBool;
      int_ OptInt;
      fx_str_t OptString;
   } u;
} _fx_N17Options__optval_t;

typedef struct _fx_T2SN17Options__optval_t {
   fx_str_t t0;
   struct _fx_N17Options__optval_t t1;
} _fx_T2SN17Options__optval_t;

typedef struct _fx_LT2SN17Options__optval_t_data_t {
   int_ rc;
   struct _fx_LT2SN17Options__optval_t_data_t* tl;
   struct _fx_T2SN17Options__optval_t hd;
} _fx_LT2SN17Options__optval_t_data_t, *_fx_LT2SN17Options__optval_t;

typedef struct _fx_R18Options__options_t {
   struct _fx_LS_data_t* app_args;
   fx_str_t app_filename;
   bool arch64;
   bool force_rebuild;
   fx_str_t build_dir;
   fx_str_t build_rootdir;
   fx_str_t cflags;
   fx_str_t clibs;
   bool compile_by_cpp;
   fx_str_t filename;
   bool gen_c;
   struct _fx_LS_data_t* include_path;
   bool debug;
   struct _fx_LT2SN17Options__optval_t_data_t* defines;
   int_ optim_iters;
   int_ inline_thresh;
   bool enable_openmp;
   bool relax;
   bool use_preamble;
   bool make_app;
   int_ optimize_level;
   fx_str_t output_name;
   bool print_ast0;
   bool print_ast;
   bool print_k0;
   bool print_k;
   bool print_tokens;
   bool run_app;
   bool verbose;
   bool W_unused;
} _fx_R18Options__options_t;

typedef struct _fx_Ta2i {
   int_ t0;
   int_ t1;
} _fx_Ta2i;

typedef struct _fx_T2Ta2iS {
   struct _fx_Ta2i t0;
   fx_str_t t1;
} _fx_T2Ta2iS;

typedef struct _fx_R9Ast__id_t {
   int_ m;
   int_ i;
   int_ j;
} _fx_R9Ast__id_t;

typedef struct _fx_R10Ast__loc_t {
   int_ m_idx;
   int_ line0;
   int_ col0;
   int_ line1;
   int_ col1;
} _fx_R10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_ti {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
} _fx_T2R9Ast__id_ti;

typedef struct _fx_T2Bi {
   bool t0;
   int_ t1;
} _fx_T2Bi;

typedef struct _fx_N12Ast__scope_t {
   int tag;
   union {
      int_ ScBlock;
      struct _fx_T2Bi ScLoop;
      int_ ScFold;
      int_ ScArrMap;
      int_ ScMap;
      int_ ScTry;
      struct _fx_R9Ast__id_t ScFun;
      struct _fx_R9Ast__id_t ScClass;
      struct _fx_R9Ast__id_t ScInterface;
      int_ ScModule;
   } u;
} _fx_N12Ast__scope_t;

typedef struct _fx_LN12Ast__scope_t_data_t {
   int_ rc;
   struct _fx_LN12Ast__scope_t_data_t* tl;
   struct _fx_N12Ast__scope_t hd;
} _fx_LN12Ast__scope_t_data_t, *_fx_LN12Ast__scope_t;

typedef struct _fx_R16Ast__val_flags_t {
   bool val_flag_arg;
   bool val_flag_mutable;
   bool val_flag_temp;
   bool val_flag_tempref;
   bool val_flag_private;
   bool val_flag_subarray;
   bool val_flag_instance;
   struct _fx_T2R9Ast__id_ti val_flag_method;
   int_ val_flag_ctor;
   struct _fx_LN12Ast__scope_t_data_t* val_flag_global;
} _fx_R16Ast__val_flags_t;

typedef struct _fx_N17Ast__fun_constr_t {
   int tag;
   union {
      int_ CtorVariant;
      struct _fx_R9Ast__id_t CtorFP;
      struct _fx_R9Ast__id_t CtorExn;
   } u;
} _fx_N17Ast__fun_constr_t;

typedef struct _fx_R16Ast__fun_flags_t {
   int_ fun_flag_pure;
   bool fun_flag_ccode;
   bool fun_flag_have_keywords;
   bool fun_flag_inline;
   bool fun_flag_nothrow;
   bool fun_flag_really_nothrow;
   bool fun_flag_private;
   struct _fx_N17Ast__fun_constr_t fun_flag_ctor;
   struct _fx_R9Ast__id_t fun_flag_method_of;
   bool fun_flag_uses_fv;
   bool fun_flag_recursive;
   bool fun_flag_instance;
} _fx_R16Ast__fun_flags_t;

typedef struct _fx_Ta2R9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R9Ast__id_t t1;
} _fx_Ta2R9Ast__id_t;

typedef struct _fx_LR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LR9Ast__id_t_data_t* tl;
   struct _fx_R9Ast__id_t hd;
} _fx_LR9Ast__id_t_data_t, *_fx_LR9Ast__id_t;

typedef struct _fx_R16Ast__var_flags_t {
   int_ var_flag_class_from;
   bool var_flag_record;
   bool var_flag_recursive;
   bool var_flag_have_tag;
   bool var_flag_have_mutable;
   bool var_flag_opt;
   bool var_flag_instance;
} _fx_R16Ast__var_flags_t;

typedef struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t {
   int tag;
   union {
      struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* Some;
   } u;
} _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t;

typedef struct _fx_R16Ast__ast_callb_t {
   struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t* ast_cb_typ;
   struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t* ast_cb_exp;
   struct _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t* ast_cb_pat;
} _fx_R16Ast__ast_callb_t;

typedef struct _fx_FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t {
   int (*fp)(struct _fx_N10Ast__pat_t_data_t*, struct _fx_R16Ast__ast_callb_t*, struct _fx_N10Ast__pat_t_data_t**, void*);
   fx_fcv_t* fcv;
} _fx_FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t;

typedef struct _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t Some;
   } u;
} _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t, *_fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t;

typedef struct _fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t {
   int (*fp)(struct _fx_N10Ast__exp_t_data_t*, struct _fx_R16Ast__ast_callb_t*, struct _fx_N10Ast__exp_t_data_t**, void*);
   fx_fcv_t* fcv;
} _fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t;

typedef struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t Some;
   } u;
} _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t, *_fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t;

typedef struct _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t {
   int (*fp)(struct _fx_N10Ast__typ_t_data_t*, struct _fx_R16Ast__ast_callb_t*, struct _fx_N10Ast__typ_t_data_t**, void*);
   fx_fcv_t* fcv;
} _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t;

typedef struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t Some;
   } u;
} _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t, *_fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t;

typedef struct _fx_Nt6option1R9Ast__id_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t Some;
   } u;
} _fx_Nt6option1R9Ast__id_t;

typedef struct _fx_Nt6option1N10Ast__exp_t_data_t {
   int_ rc;
   union {
      struct _fx_N10Ast__exp_t_data_t* Some;
   } u;
} _fx_Nt6option1N10Ast__exp_t_data_t, *_fx_Nt6option1N10Ast__exp_t;

typedef struct _fx_Nt6option1i {
   int tag;
   union {
      int_ Some;
   } u;
} _fx_Nt6option1i;

typedef struct _fx_FPi2SS {
   int (*fp)(fx_str_t*, fx_str_t*, int_*, void*);
   fx_fcv_t* fcv;
} _fx_FPi2SS;

typedef struct _fx_Rt20Hashmap__hashentry_t2Si {
   uint64_t hv;
   fx_str_t key;
   int_ data;
} _fx_Rt20Hashmap__hashentry_t2Si;

typedef struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* data;
} _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si {
   struct _fx_Rt20Hashmap__hashentry_t2Si t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si;

typedef struct _fx_Nt10Hashmap__t2Si_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si t;
   } u;
} _fx_Nt10Hashmap__t2Si_data_t, *_fx_Nt10Hashmap__t2Si;

typedef struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t {
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t
         t;
   } u;
} _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t, *_fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t;

typedef struct _fx_Rt24Hashset__hashset_entry_t1S {
   uint64_t hv;
   fx_str_t key;
} _fx_Rt24Hashset__hashset_entry_t1S;

typedef struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t {
   uint64_t hv;
   struct _fx_R9Ast__id_t key;
} _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t;

typedef struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S {
   struct _fx_Rt24Hashset__hashset_entry_t1S t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S;

typedef struct _fx_Nt10Hashset__t1S_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S t;
   } u;
} _fx_Nt10Hashset__t1S_data_t, *_fx_Nt10Hashset__t1S;

typedef struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t {
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t t0;
   int_ t1;
   int_ t2;
   int_ t3;
   fx_arr_t t4;
   fx_arr_t t5;
} _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t;

typedef struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t t;
   } u;
} _fx_Nt10Hashset__t1R9Ast__id_t_data_t, *_fx_Nt10Hashset__t1R9Ast__id_t;

typedef struct _fx_T3iA1SS {
   int_ t0;
   fx_arr_t t1;
   fx_str_t t2;
} _fx_T3iA1SS;

typedef struct _fx_Nt9Dynvec__t1S_data_t {
   int_ rc;
   union {
      struct _fx_T3iA1SS t;
   } u;
} _fx_Nt9Dynvec__t1S_data_t, *_fx_Nt9Dynvec__t1S;

typedef struct _fx_R13Ast__defval_t {
   struct _fx_R9Ast__id_t dv_name;
   struct _fx_N10Ast__typ_t_data_t* dv_typ;
   struct _fx_R16Ast__val_flags_t dv_flags;
   struct _fx_LN12Ast__scope_t_data_t* dv_scope;
   struct _fx_R10Ast__loc_t dv_loc;
} _fx_R13Ast__defval_t;

typedef struct _fx_FPi2R9Ast__id_tR9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, struct _fx_R9Ast__id_t*, int_*, void*);
   fx_fcv_t* fcv;
} _fx_FPi2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* root;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t;

typedef struct _fx_LN10Ast__pat_t_data_t {
   int_ rc;
   struct _fx_LN10Ast__pat_t_data_t* tl;
   struct _fx_N10Ast__pat_t_data_t* hd;
} _fx_LN10Ast__pat_t_data_t, *_fx_LN10Ast__pat_t;

typedef struct _fx_rLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LR9Ast__id_t_data_t* data;
} _fx_rLR9Ast__id_t_data_t, *_fx_rLR9Ast__id_t;

typedef struct _fx_R13Ast__deffun_t {
   struct _fx_R9Ast__id_t df_name;
   struct _fx_LR9Ast__id_t_data_t* df_templ_args;
   struct _fx_LN10Ast__pat_t_data_t* df_args;
   struct _fx_N10Ast__typ_t_data_t* df_typ;
   struct _fx_N10Ast__exp_t_data_t* df_body;
   struct _fx_R16Ast__fun_flags_t df_flags;
   struct _fx_LN12Ast__scope_t_data_t* df_scope;
   struct _fx_R10Ast__loc_t df_loc;
   struct _fx_rLR9Ast__id_t_data_t* df_templ_inst;
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t df_env;
} _fx_R13Ast__deffun_t;

typedef struct _fx_rR13Ast__deffun_t_data_t {
   int_ rc;
   struct _fx_R13Ast__deffun_t data;
} _fx_rR13Ast__deffun_t_data_t, *_fx_rR13Ast__deffun_t;

typedef struct _fx_R13Ast__defexn_t {
   struct _fx_R9Ast__id_t dexn_name;
   struct _fx_N10Ast__typ_t_data_t* dexn_typ;
   struct _fx_LN12Ast__scope_t_data_t* dexn_scope;
   struct _fx_R10Ast__loc_t dexn_loc;
} _fx_R13Ast__defexn_t;

typedef struct _fx_rR13Ast__defexn_t_data_t {
   int_ rc;
   struct _fx_R13Ast__defexn_t data;
} _fx_rR13Ast__defexn_t_data_t, *_fx_rR13Ast__defexn_t;

typedef struct _fx_R13Ast__deftyp_t {
   struct _fx_R9Ast__id_t dt_name;
   struct _fx_LR9Ast__id_t_data_t* dt_templ_args;
   struct _fx_N10Ast__typ_t_data_t* dt_typ;
   bool dt_finalized;
   struct _fx_LN12Ast__scope_t_data_t* dt_scope;
   struct _fx_R10Ast__loc_t dt_loc;
} _fx_R13Ast__deftyp_t;

typedef struct _fx_rR13Ast__deftyp_t_data_t {
   int_ rc;
   struct _fx_R13Ast__deftyp_t data;
} _fx_rR13Ast__deftyp_t_data_t, *_fx_rR13Ast__deftyp_t;

typedef struct _fx_T2R9Ast__id_tN10Ast__typ_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
} _fx_T2R9Ast__id_tN10Ast__typ_t;

typedef struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN10Ast__typ_t hd;
} _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t, *_fx_LT2R9Ast__id_tN10Ast__typ_t;

typedef struct _fx_LTa2R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LTa2R9Ast__id_t_data_t* tl;
   struct _fx_Ta2R9Ast__id_t hd;
} _fx_LTa2R9Ast__id_t_data_t, *_fx_LTa2R9Ast__id_t;

typedef struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LTa2R9Ast__id_t_data_t* t1;
} _fx_T2R9Ast__id_tLTa2R9Ast__id_t;

typedef struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* tl;
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t hd;
} _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t, *_fx_LT2R9Ast__id_tLTa2R9Ast__id_t;

typedef struct _fx_R17Ast__defvariant_t {
   struct _fx_R9Ast__id_t dvar_name;
   struct _fx_LR9Ast__id_t_data_t* dvar_templ_args;
   struct _fx_N10Ast__typ_t_data_t* dvar_alias;
   struct _fx_R16Ast__var_flags_t dvar_flags;
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* dvar_cases;
   struct _fx_LR9Ast__id_t_data_t* dvar_ctors;
   struct _fx_rLR9Ast__id_t_data_t* dvar_templ_inst;
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* dvar_ifaces;
   struct _fx_LN12Ast__scope_t_data_t* dvar_scope;
   struct _fx_R10Ast__loc_t dvar_loc;
} _fx_R17Ast__defvariant_t;

typedef struct _fx_rR17Ast__defvariant_t_data_t {
   int_ rc;
   struct _fx_R17Ast__defvariant_t data;
} _fx_rR17Ast__defvariant_t_data_t, *_fx_rR17Ast__defvariant_t;

typedef struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_R16Ast__fun_flags_t t2;
} _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t;

typedef struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t {
   int_ rc;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* tl;
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t hd;
} _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t, *_fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t;

typedef struct _fx_R19Ast__definterface_t {
   struct _fx_R9Ast__id_t di_name;
   struct _fx_R9Ast__id_t di_base;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* di_new_methods;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* di_all_methods;
   struct _fx_LN12Ast__scope_t_data_t* di_scope;
   struct _fx_R10Ast__loc_t di_loc;
} _fx_R19Ast__definterface_t;

typedef struct _fx_rR19Ast__definterface_t_data_t {
   int_ rc;
   struct _fx_R19Ast__definterface_t data;
} _fx_rR19Ast__definterface_t_data_t, *_fx_rR19Ast__definterface_t;

typedef struct _fx_N14Ast__id_info_t {
   int tag;
   union {
      struct _fx_R13Ast__defval_t IdDVal;
      struct _fx_rR13Ast__deffun_t_data_t* IdFun;
      struct _fx_rR13Ast__defexn_t_data_t* IdExn;
      struct _fx_rR13Ast__deftyp_t_data_t* IdTyp;
      struct _fx_rR17Ast__defvariant_t_data_t* IdVariant;
      struct _fx_rR19Ast__definterface_t_data_t* IdInterface;
      int_ IdModule;
   } u;
} _fx_N14Ast__id_info_t;

typedef struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t {
   int_ t0;
   fx_arr_t t1;
   struct _fx_N14Ast__id_info_t t2;
} _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t;

typedef struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t {
   int_ rc;
   union {
      struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t t;
   } u;
} _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t, *_fx_Nt9Dynvec__t1N14Ast__id_info_t;

typedef struct _fx_N12Map__color_t {
   int tag;
} _fx_N12Map__color_t;

typedef struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t {
   struct _fx_N12Map__color_t t0;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_R9Ast__id_t t3;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t4;
} _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t
         Node;
   } u;
} _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t, *_fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_LN16Ast__env_entry_t_data_t {
   int_ rc;
   struct _fx_LN16Ast__env_entry_t_data_t* tl;
   struct _fx_N16Ast__env_entry_t_data_t* hd;
} _fx_LN16Ast__env_entry_t_data_t, *_fx_LN16Ast__env_entry_t;

typedef struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t {
   struct _fx_N12Map__color_t t0;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_LN16Ast__env_entry_t_data_t* t3;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t4;
} _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t;

typedef struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t {
   int_ rc;
   union {
      struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t
         Node;
   } u;
} _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t, *_fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t;

typedef struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* root;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_N12Set__color_t {
   int tag;
} _fx_N12Set__color_t;

typedef struct _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S {
   struct _fx_N12Set__color_t t0;
   struct _fx_Nt11Set__tree_t1S_data_t* t1;
   fx_str_t t2;
   struct _fx_Nt11Set__tree_t1S_data_t* t3;
} _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S;

typedef struct _fx_Nt11Set__tree_t1S_data_t {
   int_ rc;
   union {
      struct _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S Node;
   } u;
} _fx_Nt11Set__tree_t1S_data_t, *_fx_Nt11Set__tree_t1S;

typedef struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t {
   struct _fx_N12Set__color_t t0;
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t3;
} _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t;

typedef struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t Node;
   } u;
} _fx_Nt11Set__tree_t1R9Ast__id_t_data_t, *_fx_Nt11Set__tree_t1R9Ast__id_t;

typedef struct _fx_Rt6Set__t1S {
   struct _fx_Nt11Set__tree_t1S_data_t* root;
   int_ size;
   struct _fx_FPi2SS cmp;
} _fx_Rt6Set__t1S;

typedef struct _fx_Rt6Set__t1R9Ast__id_t {
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* root;
   int_ size;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Set__t1R9Ast__id_t;

typedef struct _fx_T2Nt11Set__tree_t1Si {
   struct _fx_Nt11Set__tree_t1S_data_t* t0;
   int_ t1;
} _fx_T2Nt11Set__tree_t1Si;

typedef struct _fx_FPv1R9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv1R9Ast__id_t;

typedef struct _fx_T2Nt11Set__tree_t1SB {
   struct _fx_Nt11Set__tree_t1S_data_t* t0;
   bool t1;
} _fx_T2Nt11Set__tree_t1SB;

typedef struct _fx_T2R10Ast__loc_tS {
   struct _fx_R10Ast__loc_t t0;
   fx_str_t t1;
} _fx_T2R10Ast__loc_tS;

typedef struct _fx_T2il {
   int_ t0;
   int64_t t1;
} _fx_T2il;

typedef struct _fx_T2iq {
   int_ t0;
   uint64_t t1;
} _fx_T2iq;

typedef struct _fx_T2id {
   int_ t0;
   double t1;
} _fx_T2id;

typedef struct _fx_N10Ast__lit_t {
   int tag;
   union {
      int64_t LitInt;
      struct _fx_T2il LitSInt;
      struct _fx_T2iq LitUInt;
      struct _fx_T2id LitFloat;
      fx_str_t LitString;
      char_ LitChar;
      bool LitBool;
   } u;
} _fx_N10Ast__lit_t;

typedef struct _fx_rNt6option1N10Ast__typ_t_data_t {
   int_ rc;
   struct _fx_Nt6option1N10Ast__typ_t_data_t* data;
} _fx_rNt6option1N10Ast__typ_t_data_t, *_fx_rNt6option1N10Ast__typ_t;

typedef struct _fx_LN10Ast__typ_t_data_t {
   int_ rc;
   struct _fx_LN10Ast__typ_t_data_t* tl;
   struct _fx_N10Ast__typ_t_data_t* hd;
} _fx_LN10Ast__typ_t_data_t, *_fx_LN10Ast__typ_t;

typedef struct _fx_T2LN10Ast__typ_tN10Ast__typ_t {
   struct _fx_LN10Ast__typ_t_data_t* t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
} _fx_T2LN10Ast__typ_tN10Ast__typ_t;

typedef struct _fx_T2iN10Ast__typ_t {
   int_ t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
} _fx_T2iN10Ast__typ_t;

typedef struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t {
   struct _fx_R16Ast__val_flags_t t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_N10Ast__typ_t_data_t* t2;
   struct _fx_N10Ast__exp_t_data_t* t3;
} _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t;

typedef struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* tl;
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t hd;
} _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t, *_fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t;

typedef struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB {
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* t0;
   bool t1;
} _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB;

typedef struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t {
   int_ rc;
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB data;
} _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t, *_fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB;

typedef struct _fx_T2LN10Ast__typ_tR9Ast__id_t {
   struct _fx_LN10Ast__typ_t_data_t* t0;
   struct _fx_R9Ast__id_t t1;
} _fx_T2LN10Ast__typ_tR9Ast__id_t;

typedef struct _fx_N10Ast__typ_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_rNt6option1N10Ast__typ_t_data_t* TypVar;
      struct _fx_Nt6option1N10Ast__typ_t_data_t* TypVarTuple;
      struct _fx_N10Ast__typ_t_data_t* TypVarArray;
      int_ TypSInt;
      int_ TypUInt;
      int_ TypFloat;
      struct _fx_T2LN10Ast__typ_tN10Ast__typ_t TypFun;
      struct _fx_N10Ast__typ_t_data_t* TypList;
      struct _fx_N10Ast__typ_t_data_t* TypVector;
      struct _fx_LN10Ast__typ_t_data_t* TypTuple;
      struct _fx_N10Ast__typ_t_data_t* TypRef;
      struct _fx_T2iN10Ast__typ_t TypArray;
      struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t* TypRecord;
      struct _fx_T2LN10Ast__typ_tR9Ast__id_t TypApp;
   } u;
} _fx_N10Ast__typ_t_data_t, *_fx_N10Ast__typ_t;

typedef struct _fx_N12Ast__cmpop_t {
   int tag;
} _fx_N12Ast__cmpop_t;

typedef struct _fx_N13Ast__binary_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_N12Ast__cmpop_t OpCmp;
      struct _fx_N12Ast__cmpop_t OpDotCmp;
      struct _fx_N13Ast__binary_t_data_t* OpAugBinary;
   } u;
} _fx_N13Ast__binary_t_data_t, *_fx_N13Ast__binary_t;

typedef struct _fx_N12Ast__unary_t {
   int tag;
} _fx_N12Ast__unary_t;

typedef struct _fx_N12Ast__sctyp_t {
   int tag;
} _fx_N12Ast__sctyp_t;

typedef struct _fx_N13Ast__intrin_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t IntrinMath;
      struct _fx_N12Ast__sctyp_t IntrinSaturate;
   } u;
} _fx_N13Ast__intrin_t;

typedef struct _fx_N15Ast__for_make_t {
   int tag;
} _fx_N15Ast__for_make_t;

typedef struct _fx_R16Ast__for_flags_t {
   bool for_flag_parallel;
   struct _fx_N15Ast__for_make_t for_flag_make;
   bool for_flag_unzip;
   bool for_flag_fold;
   bool for_flag_nested;
} _fx_R16Ast__for_flags_t;

typedef struct _fx_N13Ast__border_t {
   int tag;
} _fx_N13Ast__border_t;

typedef struct _fx_N18Ast__interpolate_t {
   int tag;
} _fx_N18Ast__interpolate_t;

typedef struct _fx_T2BR10Ast__loc_t {
   bool t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2BR10Ast__loc_t;

typedef struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t {
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__typ_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0;
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t1;
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__lit_t t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N13Ast__binary_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_N10Ast__exp_t_data_t* t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N12Ast__unary_t t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LN10Ast__exp_t_data_t* tl;
   struct _fx_N10Ast__exp_t_data_t* hd;
} _fx_LN10Ast__exp_t_data_t, *_fx_LN10Ast__exp_t;

typedef struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N13Ast__intrin_t t0;
   struct _fx_LN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN10Ast__exp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
} _fx_T2R9Ast__id_tN10Ast__exp_t;

typedef struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_LN10Ast__exp_t_data_t* t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LLN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LLN10Ast__exp_t_data_t* tl;
   struct _fx_LN10Ast__exp_t_data_t* hd;
} _fx_LLN10Ast__exp_t_data_t, *_fx_LLN10Ast__exp_t;

typedef struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_LLN10Ast__exp_t_data_t* t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN10Ast__exp_t hd;
} _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t, *_fx_LT2R9Ast__id_tN10Ast__exp_t;

typedef struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_LN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N13Ast__border_t t1;
   struct _fx_N18Ast__interpolate_t t2;
   struct _fx_LN10Ast__exp_t_data_t* t3;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t4;
} _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__exp_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_N10Ast__exp_t_data_t* t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__pat_tN10Ast__exp_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
} _fx_T2N10Ast__pat_tN10Ast__exp_t;

typedef struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t {
   int_ rc;
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* tl;
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t hd;
} _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t, *_fx_LT2N10Ast__pat_tN10Ast__exp_t;

typedef struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t {
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
   struct _fx_N10Ast__exp_t_data_t* t2;
   struct _fx_R16Ast__for_flags_t t3;
   struct _fx_R10Ast__loc_t t4;
} _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t;

typedef struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t {
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
} _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t;

typedef struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t {
   int_ rc;
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* tl;
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t hd;
} _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t, *_fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t;

typedef struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R16Ast__for_flags_t t2;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t3;
} _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__exp_t_data_t* t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t1;
} _fx_T2ST2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t {
   fx_str_t t0;
   fx_str_t t1;
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t t2;
} _fx_T3SST2N10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R16Ast__val_flags_t t2;
   struct _fx_R10Ast__loc_t t3;
} _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t;

typedef struct _fx_T2iR9Ast__id_t {
   int_ t0;
   struct _fx_R9Ast__id_t t1;
} _fx_T2iR9Ast__id_t;

typedef struct _fx_LT2iR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2iR9Ast__id_t_data_t* tl;
   struct _fx_T2iR9Ast__id_t hd;
} _fx_LT2iR9Ast__id_t_data_t, *_fx_LT2iR9Ast__id_t;

typedef struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t {
   struct _fx_LT2iR9Ast__id_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LT2iR9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T3iLR9Ast__id_tR10Ast__loc_t {
   int_ t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3iLR9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T2LSR10Ast__loc_t {
   struct _fx_LS_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LSR10Ast__loc_t;

typedef struct _fx_N10Ast__exp_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t ExpNop;
      struct _fx_T2BR10Ast__loc_t ExpBreak;
      struct _fx_R10Ast__loc_t ExpContinue;
      struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t ExpReturn;
      struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpRange;
      struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t ExpLit;
      struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t ExpIdent;
      struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpBinary;
      struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpUnary;
      struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpIntrin;
      struct _fx_T2R9Ast__id_tN10Ast__exp_t ExpSync;
      struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpSeq;
      struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkTuple;
      struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkArray;
      struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkVector;
      struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMkRecord;
      struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpUpdateRecord;
      struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpCall;
      struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpAt;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t ExpAssign;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMem;
      struct _fx_T2N10Ast__exp_tR10Ast__loc_t ExpThrow;
      struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpIf;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t ExpWhile;
      struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t ExpDoWhile;
      struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t ExpFor;
      struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t
         ExpMap;
      struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpTryCatch;
      struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t ExpMatch;
      struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t ExpCast;
      struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t ExpTyped;
      struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t ExpCCode;
      struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t ExpData;
      struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t DefVal;
      struct _fx_rR13Ast__deffun_t_data_t* DefFun;
      struct _fx_rR13Ast__defexn_t_data_t* DefExn;
      struct _fx_rR13Ast__deftyp_t_data_t* DefTyp;
      struct _fx_rR17Ast__defvariant_t_data_t* DefVariant;
      struct _fx_rR19Ast__definterface_t_data_t* DefInterface;
      struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t DirImport;
      struct _fx_T3iLR9Ast__id_tR10Ast__loc_t DirImportFrom;
      struct _fx_T2LSR10Ast__loc_t DirPragma;
   } u;
} _fx_N10Ast__exp_t_data_t, *_fx_N10Ast__exp_t;

typedef struct _fx_T2N10Ast__lit_tR10Ast__loc_t {
   struct _fx_N10Ast__lit_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__lit_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2R9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T2LN10Ast__pat_tR10Ast__loc_t {
   struct _fx_LN10Ast__pat_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2LN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LN10Ast__pat_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN10Ast__pat_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
} _fx_T2R9Ast__id_tN10Ast__pat_t;

typedef struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN10Ast__pat_t hd;
} _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t, *_fx_LT2R9Ast__id_tN10Ast__pat_t;

typedef struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t {
   struct _fx_Nt6option1R9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__pat_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_N10Ast__exp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t;

typedef struct _fx_T2N10Ast__pat_tR10Ast__loc_t {
   struct _fx_N10Ast__pat_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N10Ast__pat_tR10Ast__loc_t;

typedef struct _fx_N10Ast__pat_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t PatAny;
      struct _fx_T2N10Ast__lit_tR10Ast__loc_t PatLit;
      struct _fx_T2R9Ast__id_tR10Ast__loc_t PatIdent;
      struct _fx_T2LN10Ast__pat_tR10Ast__loc_t PatTuple;
      struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t PatVariant;
      struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t PatRecord;
      struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t PatCons;
      struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t PatAs;
      struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t PatTyped;
      struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t PatWhen;
      struct _fx_T2LN10Ast__pat_tR10Ast__loc_t PatAlt;
      struct _fx_T2N10Ast__pat_tR10Ast__loc_t PatRef;
   } u;
} _fx_N10Ast__pat_t_data_t, *_fx_N10Ast__pat_t;

typedef struct _fx_N16Ast__env_entry_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R9Ast__id_t EnvId;
      struct _fx_N10Ast__typ_t_data_t* EnvTyp;
   } u;
} _fx_N16Ast__env_entry_t_data_t, *_fx_N16Ast__env_entry_t;

typedef struct _fx_T2SR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2SR10Ast__loc_t;

typedef struct _fx_LT2SR10Ast__loc_t_data_t {
   int_ rc;
   struct _fx_LT2SR10Ast__loc_t_data_t* tl;
   struct _fx_T2SR10Ast__loc_t hd;
} _fx_LT2SR10Ast__loc_t_data_t, *_fx_LT2SR10Ast__loc_t;

typedef struct _fx_R14Ast__pragmas_t {
   bool pragma_cpp;
   struct _fx_LT2SR10Ast__loc_t_data_t* pragma_clibs;
} _fx_R14Ast__pragmas_t;

typedef struct _fx_Li_data_t {
   int_ rc;
   struct _fx_Li_data_t* tl;
   int_ hd;
} _fx_Li_data_t, *_fx_Li;

typedef struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t {
   struct _fx_R9Ast__id_t t0;
   fx_str_t t1;
   int_ t2;
   bool t3;
   struct _fx_LN10Ast__exp_t_data_t* t4;
   struct _fx_Li_data_t* t5;
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t t6;
   bool t7;
   int_ t8;
   struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t* t9;
} _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t;

typedef struct _fx_N16Ast__defmodule_t_data_t {
   int_ rc;
   union {
      struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t
         defmodule_t;
   } u;
} _fx_N16Ast__defmodule_t_data_t, *_fx_N16Ast__defmodule_t;

typedef struct _fx_T2LSi {
   struct _fx_LS_data_t* t0;
   int_ t1;
} _fx_T2LSi;

typedef struct _fx_T2R9Ast__id_tT2LSi {
   struct _fx_R9Ast__id_t t0;
   struct _fx_T2LSi t1;
} _fx_T2R9Ast__id_tT2LSi;

typedef struct _fx_LR10Ast__loc_t_data_t {
   int_ rc;
   struct _fx_LR10Ast__loc_t_data_t* tl;
   struct _fx_R10Ast__loc_t hd;
} _fx_LR10Ast__loc_t_data_t, *_fx_LR10Ast__loc_t;

typedef struct _fx_LE_data_t {
   int_ rc;
   struct _fx_LE_data_t* tl;
   fx_exn_t hd;
} _fx_LE_data_t, *_fx_LE;

typedef struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N10Ast__typ_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t_data_t {
   int_ rc;
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t_data_t* tl;
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t hd;
} _fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t_data_t, *_fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t;

typedef struct _fx_Ta2S {
   fx_str_t t0;
   fx_str_t t1;
} _fx_Ta2S;

typedef struct _fx_rB_data_t {
   int_ rc;
   bool data;
} _fx_rB_data_t, *_fx_rB;

typedef struct {
   int_ rc;
   int_ data;
} _fx_E4Exit_data_t;

typedef struct {
   int_ rc;
   fx_str_t data;
} _fx_E4Fail_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2Ta2iS data;
} _fx_E22LexerUtils__LexerError_data_t;

static void _fx_free_Nt6option1N10Ast__typ_t(struct _fx_Nt6option1N10Ast__typ_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_N10Ast__typ_t(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_LS(struct _fx_LS_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LS, fx_free_str);
}

static int _fx_cons_LS(fx_str_t* hd, struct _fx_LS_data_t* tl, bool addref_tl, struct _fx_LS_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LS, fx_copy_str);
}

static void _fx_free_R7File__t(struct _fx_R7File__t* dst)
{
   fx_free_cptr(&dst->handle);
}

static void _fx_copy_R7File__t(struct _fx_R7File__t* src, struct _fx_R7File__t* dst)
{
   fx_copy_cptr(src->handle, &dst->handle);
}

static void _fx_make_R7File__t(fx_cptr_t r_handle, struct _fx_R7File__t* fx_result)
{
   fx_copy_cptr(r_handle, &fx_result->handle);
}

static void _fx_free_N17Options__optval_t(struct _fx_N17Options__optval_t* dst)
{
   switch (dst->tag) {
   case 3:
      fx_free_str(&dst->u.OptString); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N17Options__optval_t(struct _fx_N17Options__optval_t* src, struct _fx_N17Options__optval_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 3:
      fx_copy_str(&src->u.OptString, &dst->u.OptString); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2SN17Options__optval_t(struct _fx_T2SN17Options__optval_t* dst)
{
   fx_free_str(&dst->t0);
   _fx_free_N17Options__optval_t(&dst->t1);
}

static void _fx_copy_T2SN17Options__optval_t(struct _fx_T2SN17Options__optval_t* src, struct _fx_T2SN17Options__optval_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   _fx_copy_N17Options__optval_t(&src->t1, &dst->t1);
}

static void _fx_make_T2SN17Options__optval_t(
   fx_str_t* t0,
   struct _fx_N17Options__optval_t* t1,
   struct _fx_T2SN17Options__optval_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   _fx_copy_N17Options__optval_t(t1, &fx_result->t1);
}

static void _fx_free_LT2SN17Options__optval_t(struct _fx_LT2SN17Options__optval_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2SN17Options__optval_t, _fx_free_T2SN17Options__optval_t);
}

static int _fx_cons_LT2SN17Options__optval_t(
   struct _fx_T2SN17Options__optval_t* hd,
   struct _fx_LT2SN17Options__optval_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2SN17Options__optval_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2SN17Options__optval_t, _fx_copy_T2SN17Options__optval_t);
}

static void _fx_free_R18Options__options_t(struct _fx_R18Options__options_t* dst)
{
   _fx_free_LS(&dst->app_args);
   fx_free_str(&dst->app_filename);
   fx_free_str(&dst->build_dir);
   fx_free_str(&dst->build_rootdir);
   fx_free_str(&dst->cflags);
   fx_free_str(&dst->clibs);
   fx_free_str(&dst->filename);
   _fx_free_LS(&dst->include_path);
   _fx_free_LT2SN17Options__optval_t(&dst->defines);
   fx_free_str(&dst->output_name);
}

static void _fx_copy_R18Options__options_t(struct _fx_R18Options__options_t* src, struct _fx_R18Options__options_t* dst)
{
   FX_COPY_PTR(src->app_args, &dst->app_args);
   fx_copy_str(&src->app_filename, &dst->app_filename);
   dst->arch64 = src->arch64;
   dst->force_rebuild = src->force_rebuild;
   fx_copy_str(&src->build_dir, &dst->build_dir);
   fx_copy_str(&src->build_rootdir, &dst->build_rootdir);
   fx_copy_str(&src->cflags, &dst->cflags);
   fx_copy_str(&src->clibs, &dst->clibs);
   dst->compile_by_cpp = src->compile_by_cpp;
   fx_copy_str(&src->filename, &dst->filename);
   dst->gen_c = src->gen_c;
   FX_COPY_PTR(src->include_path, &dst->include_path);
   dst->debug = src->debug;
   FX_COPY_PTR(src->defines, &dst->defines);
   dst->optim_iters = src->optim_iters;
   dst->inline_thresh = src->inline_thresh;
   dst->enable_openmp = src->enable_openmp;
   dst->relax = src->relax;
   dst->use_preamble = src->use_preamble;
   dst->make_app = src->make_app;
   dst->optimize_level = src->optimize_level;
   fx_copy_str(&src->output_name, &dst->output_name);
   dst->print_ast0 = src->print_ast0;
   dst->print_ast = src->print_ast;
   dst->print_k0 = src->print_k0;
   dst->print_k = src->print_k;
   dst->print_tokens = src->print_tokens;
   dst->run_app = src->run_app;
   dst->verbose = src->verbose;
   dst->W_unused = src->W_unused;
}

static void _fx_make_R18Options__options_t(
   struct _fx_LS_data_t* r_app_args,
   fx_str_t* r_app_filename,
   bool r_arch64,
   bool r_force_rebuild,
   fx_str_t* r_build_dir,
   fx_str_t* r_build_rootdir,
   fx_str_t* r_cflags,
   fx_str_t* r_clibs,
   bool r_compile_by_cpp,
   fx_str_t* r_filename,
   bool r_gen_c,
   struct _fx_LS_data_t* r_include_path,
   bool r_debug,
   struct _fx_LT2SN17Options__optval_t_data_t* r_defines,
   int_ r_optim_iters,
   int_ r_inline_thresh,
   bool r_enable_openmp,
   bool r_relax,
   bool r_use_preamble,
   bool r_make_app,
   int_ r_optimize_level,
   fx_str_t* r_output_name,
   bool r_print_ast0,
   bool r_print_ast,
   bool r_print_k0,
   bool r_print_k,
   bool r_print_tokens,
   bool r_run_app,
   bool r_verbose,
   bool r_W_unused,
   struct _fx_R18Options__options_t* fx_result)
{
   FX_COPY_PTR(r_app_args, &fx_result->app_args);
   fx_copy_str(r_app_filename, &fx_result->app_filename);
   fx_result->arch64 = r_arch64;
   fx_result->force_rebuild = r_force_rebuild;
   fx_copy_str(r_build_dir, &fx_result->build_dir);
   fx_copy_str(r_build_rootdir, &fx_result->build_rootdir);
   fx_copy_str(r_cflags, &fx_result->cflags);
   fx_copy_str(r_clibs, &fx_result->clibs);
   fx_result->compile_by_cpp = r_compile_by_cpp;
   fx_copy_str(r_filename, &fx_result->filename);
   fx_result->gen_c = r_gen_c;
   FX_COPY_PTR(r_include_path, &fx_result->include_path);
   fx_result->debug = r_debug;
   FX_COPY_PTR(r_defines, &fx_result->defines);
   fx_result->optim_iters = r_optim_iters;
   fx_result->inline_thresh = r_inline_thresh;
   fx_result->enable_openmp = r_enable_openmp;
   fx_result->relax = r_relax;
   fx_result->use_preamble = r_use_preamble;
   fx_result->make_app = r_make_app;
   fx_result->optimize_level = r_optimize_level;
   fx_copy_str(r_output_name, &fx_result->output_name);
   fx_result->print_ast0 = r_print_ast0;
   fx_result->print_ast = r_print_ast;
   fx_result->print_k0 = r_print_k0;
   fx_result->print_k = r_print_k;
   fx_result->print_tokens = r_print_tokens;
   fx_result->run_app = r_run_app;
   fx_result->verbose = r_verbose;
   fx_result->W_unused = r_W_unused;
}

static void _fx_free_T2Ta2iS(struct _fx_T2Ta2iS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2Ta2iS(struct _fx_T2Ta2iS* src, struct _fx_T2Ta2iS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2Ta2iS(struct _fx_Ta2i* t0, fx_str_t* t1, struct _fx_T2Ta2iS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static int _fx_cons_LN12Ast__scope_t(
   struct _fx_N12Ast__scope_t* hd,
   struct _fx_LN12Ast__scope_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN12Ast__scope_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN12Ast__scope_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* dst)
{
   fx_free_list_simple(&dst->val_flag_global);
}

static void _fx_copy_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* src, struct _fx_R16Ast__val_flags_t* dst)
{
   dst->val_flag_arg = src->val_flag_arg;
   dst->val_flag_mutable = src->val_flag_mutable;
   dst->val_flag_temp = src->val_flag_temp;
   dst->val_flag_tempref = src->val_flag_tempref;
   dst->val_flag_private = src->val_flag_private;
   dst->val_flag_subarray = src->val_flag_subarray;
   dst->val_flag_instance = src->val_flag_instance;
   dst->val_flag_method = src->val_flag_method;
   dst->val_flag_ctor = src->val_flag_ctor;
   FX_COPY_PTR(src->val_flag_global, &dst->val_flag_global);
}

static void _fx_make_R16Ast__val_flags_t(
   bool r_val_flag_arg,
   bool r_val_flag_mutable,
   bool r_val_flag_temp,
   bool r_val_flag_tempref,
   bool r_val_flag_private,
   bool r_val_flag_subarray,
   bool r_val_flag_instance,
   struct _fx_T2R9Ast__id_ti* r_val_flag_method,
   int_ r_val_flag_ctor,
   struct _fx_LN12Ast__scope_t_data_t* r_val_flag_global,
   struct _fx_R16Ast__val_flags_t* fx_result)
{
   fx_result->val_flag_arg = r_val_flag_arg;
   fx_result->val_flag_mutable = r_val_flag_mutable;
   fx_result->val_flag_temp = r_val_flag_temp;
   fx_result->val_flag_tempref = r_val_flag_tempref;
   fx_result->val_flag_private = r_val_flag_private;
   fx_result->val_flag_subarray = r_val_flag_subarray;
   fx_result->val_flag_instance = r_val_flag_instance;
   fx_result->val_flag_method = *r_val_flag_method;
   fx_result->val_flag_ctor = r_val_flag_ctor;
   FX_COPY_PTR(r_val_flag_global, &fx_result->val_flag_global);
}

static int _fx_cons_LR9Ast__id_t(
   struct _fx_R9Ast__id_t* hd,
   struct _fx_LR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_Nt6option1Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1Nt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* src,
   struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      FX_COPY_PTR(src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_R16Ast__ast_callb_t(struct _fx_R16Ast__ast_callb_t* dst)
{
   _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(&dst->ast_cb_typ);
   _fx_free_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t(&dst->ast_cb_exp);
   _fx_free_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t(&dst->ast_cb_pat);
}

static void _fx_copy_R16Ast__ast_callb_t(struct _fx_R16Ast__ast_callb_t* src, struct _fx_R16Ast__ast_callb_t* dst)
{
   FX_COPY_PTR(src->ast_cb_typ, &dst->ast_cb_typ);
   FX_COPY_PTR(src->ast_cb_exp, &dst->ast_cb_exp);
   FX_COPY_PTR(src->ast_cb_pat, &dst->ast_cb_pat);
}

static void _fx_make_R16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t* r_ast_cb_typ,
   struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t* r_ast_cb_exp,
   struct _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t* r_ast_cb_pat,
   struct _fx_R16Ast__ast_callb_t* fx_result)
{
   FX_COPY_PTR(r_ast_cb_typ, &fx_result->ast_cb_typ);
   FX_COPY_PTR(r_ast_cb_exp, &fx_result->ast_cb_exp);
   FX_COPY_PTR(r_ast_cb_pat, &fx_result->ast_cb_pat);
}

static void _fx_free_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(
   struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1N10Ast__exp_t(struct _fx_Nt6option1N10Ast__exp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_N10Ast__exp_t(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt20Hashmap__hashentry_t2Si(struct _fx_Rt20Hashmap__hashentry_t2Si* dst)
{
   fx_free_str(&dst->key);
}

static void _fx_copy_Rt20Hashmap__hashentry_t2Si(
   struct _fx_Rt20Hashmap__hashentry_t2Si* src,
   struct _fx_Rt20Hashmap__hashentry_t2Si* dst)
{
   dst->hv = src->hv;
   fx_copy_str(&src->key, &dst->key);
   dst->data = src->data;
}

static void _fx_make_Rt20Hashmap__hashentry_t2Si(
   uint64_t r_hv,
   fx_str_t* r_key,
   int_ r_data,
   struct _fx_Rt20Hashmap__hashentry_t2Si* fx_result)
{
   fx_result->hv = r_hv;
   fx_copy_str(r_key, &fx_result->key);
   fx_result->data = r_data;
}

static void _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* dst)
{
   _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->data);
}

static void _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* src,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* dst)
{
   dst->hv = src->hv;
   dst->key = src->key;
   FX_COPY_PTR(src->data, &dst->data);
}

static void _fx_make_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   uint64_t r_hv,
   struct _fx_R9Ast__id_t* r_key,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* r_data,
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* fx_result)
{
   fx_result->hv = r_hv;
   fx_result->key = *r_key;
   FX_COPY_PTR(r_data, &fx_result->data);
}

static void _fx_free_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si(
   struct _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si* dst)
{
   _fx_free_Rt20Hashmap__hashentry_t2Si(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void _fx_copy_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si(
   struct _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si* src,
   struct _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si* dst)
{
   _fx_copy_Rt20Hashmap__hashentry_t2Si(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void _fx_make_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si(
   struct _fx_Rt20Hashmap__hashentry_t2Si* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si* fx_result)
{
   _fx_copy_Rt20Hashmap__hashentry_t2Si(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashmap__t2Si(struct _fx_Nt10Hashmap__t2Si_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si(&(*dst)->u.t); fx_free(*dst);
   }
   *dst = 0;
}

static void
   _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      dst)
{
   _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void
   _fx_copy_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      src,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      dst)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void
   _fx_make_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t*
      fx_result)
{
   _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_tiiiA1iA1Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
         &(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt24Hashset__hashset_entry_t1S(struct _fx_Rt24Hashset__hashset_entry_t1S* dst)
{
   fx_free_str(&dst->key);
}

static void _fx_copy_Rt24Hashset__hashset_entry_t1S(
   struct _fx_Rt24Hashset__hashset_entry_t1S* src,
   struct _fx_Rt24Hashset__hashset_entry_t1S* dst)
{
   dst->hv = src->hv;
   fx_copy_str(&src->key, &dst->key);
}

static void _fx_make_Rt24Hashset__hashset_entry_t1S(
   uint64_t r_hv,
   fx_str_t* r_key,
   struct _fx_Rt24Hashset__hashset_entry_t1S* fx_result)
{
   fx_result->hv = r_hv;
   fx_copy_str(r_key, &fx_result->key);
}

static void _fx_free_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* dst)
{
   _fx_free_Rt24Hashset__hashset_entry_t1S(&dst->t0);
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void _fx_copy_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* src,
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* dst)
{
   _fx_copy_Rt24Hashset__hashset_entry_t1S(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void _fx_make_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_Rt24Hashset__hashset_entry_t1S* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S* fx_result)
{
   _fx_copy_Rt24Hashset__hashset_entry_t1S(t0, &fx_result->t0);
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashset__t1S(struct _fx_Nt10Hashset__t1S_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(&(*dst)->u.t); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* dst)
{
   fx_free_arr(&dst->t4);
   fx_free_arr(&dst->t5);
}

static void _fx_copy_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* src,
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   fx_copy_arr(&src->t4, &dst->t4);
   fx_copy_arr(&src->t5, &dst->t5);
}

static void _fx_make_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* t0,
   int_ t1,
   int_ t2,
   int_ t3,
   fx_arr_t* t4,
   fx_arr_t* t5,
   struct _fx_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   fx_copy_arr(t4, &fx_result->t4);
   fx_copy_arr(t5, &fx_result->t5);
}

static void _fx_free_Nt10Hashset__t1R9Ast__id_t(struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T6Rt24Hashset__hashset_entry_t1R9Ast__id_tiiiA1iA1Rt24Hashset__hashset_entry_t1R9Ast__id_t(&(*dst)->u.t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T3iA1SS(struct _fx_T3iA1SS* dst)
{
   fx_free_arr(&dst->t1);
   fx_free_str(&dst->t2);
}

static void _fx_copy_T3iA1SS(struct _fx_T3iA1SS* src, struct _fx_T3iA1SS* dst)
{
   dst->t0 = src->t0;
   fx_copy_arr(&src->t1, &dst->t1);
   fx_copy_str(&src->t2, &dst->t2);
}

static void _fx_make_T3iA1SS(int_ t0, fx_arr_t* t1, fx_str_t* t2, struct _fx_T3iA1SS* fx_result)
{
   fx_result->t0 = t0;
   fx_copy_arr(t1, &fx_result->t1);
   fx_copy_str(t2, &fx_result->t2);
}

static void _fx_free_Nt9Dynvec__t1S(struct _fx_Nt9Dynvec__t1S_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T3iA1SS(&(*dst)->u.t); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R13Ast__defval_t(struct _fx_R13Ast__defval_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->dv_typ);
   _fx_free_R16Ast__val_flags_t(&dst->dv_flags);
   fx_free_list_simple(&dst->dv_scope);
}

static void _fx_copy_R13Ast__defval_t(struct _fx_R13Ast__defval_t* src, struct _fx_R13Ast__defval_t* dst)
{
   dst->dv_name = src->dv_name;
   FX_COPY_PTR(src->dv_typ, &dst->dv_typ);
   _fx_copy_R16Ast__val_flags_t(&src->dv_flags, &dst->dv_flags);
   FX_COPY_PTR(src->dv_scope, &dst->dv_scope);
   dst->dv_loc = src->dv_loc;
}

static void _fx_make_R13Ast__defval_t(
   struct _fx_R9Ast__id_t* r_dv_name,
   struct _fx_N10Ast__typ_t_data_t* r_dv_typ,
   struct _fx_R16Ast__val_flags_t* r_dv_flags,
   struct _fx_LN12Ast__scope_t_data_t* r_dv_scope,
   struct _fx_R10Ast__loc_t* r_dv_loc,
   struct _fx_R13Ast__defval_t* fx_result)
{
   fx_result->dv_name = *r_dv_name;
   FX_COPY_PTR(r_dv_typ, &fx_result->dv_typ);
   _fx_copy_R16Ast__val_flags_t(r_dv_flags, &fx_result->dv_flags);
   FX_COPY_PTR(r_dv_scope, &fx_result->dv_scope);
   fx_result->dv_loc = *r_dv_loc;
}

static void _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* src,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* r_root,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_LN10Ast__pat_t(struct _fx_LN10Ast__pat_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN10Ast__pat_t, _fx_free_N10Ast__pat_t);
}

static int _fx_cons_LN10Ast__pat_t(
   struct _fx_N10Ast__pat_t_data_t* hd,
   struct _fx_LN10Ast__pat_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN10Ast__pat_t, FX_COPY_PTR);
}

static void _fx_free_rLR9Ast__id_t(struct _fx_rLR9Ast__id_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rLR9Ast__id_t, fx_free_list_simple);
}

static int _fx_make_rLR9Ast__id_t(struct _fx_LR9Ast__id_t_data_t* arg, struct _fx_rLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rLR9Ast__id_t, FX_COPY_PTR);
}

static void _fx_free_R13Ast__deffun_t(struct _fx_R13Ast__deffun_t* dst)
{
   fx_free_list_simple(&dst->df_templ_args);
   _fx_free_LN10Ast__pat_t(&dst->df_args);
   _fx_free_N10Ast__typ_t(&dst->df_typ);
   _fx_free_N10Ast__exp_t(&dst->df_body);
   fx_free_list_simple(&dst->df_scope);
   _fx_free_rLR9Ast__id_t(&dst->df_templ_inst);
   _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&dst->df_env);
}

static void _fx_copy_R13Ast__deffun_t(struct _fx_R13Ast__deffun_t* src, struct _fx_R13Ast__deffun_t* dst)
{
   dst->df_name = src->df_name;
   FX_COPY_PTR(src->df_templ_args, &dst->df_templ_args);
   FX_COPY_PTR(src->df_args, &dst->df_args);
   FX_COPY_PTR(src->df_typ, &dst->df_typ);
   FX_COPY_PTR(src->df_body, &dst->df_body);
   dst->df_flags = src->df_flags;
   FX_COPY_PTR(src->df_scope, &dst->df_scope);
   dst->df_loc = src->df_loc;
   FX_COPY_PTR(src->df_templ_inst, &dst->df_templ_inst);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&src->df_env, &dst->df_env);
}

static void _fx_make_R13Ast__deffun_t(
   struct _fx_R9Ast__id_t* r_df_name,
   struct _fx_LR9Ast__id_t_data_t* r_df_templ_args,
   struct _fx_LN10Ast__pat_t_data_t* r_df_args,
   struct _fx_N10Ast__typ_t_data_t* r_df_typ,
   struct _fx_N10Ast__exp_t_data_t* r_df_body,
   struct _fx_R16Ast__fun_flags_t* r_df_flags,
   struct _fx_LN12Ast__scope_t_data_t* r_df_scope,
   struct _fx_R10Ast__loc_t* r_df_loc,
   struct _fx_rLR9Ast__id_t_data_t* r_df_templ_inst,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* r_df_env,
   struct _fx_R13Ast__deffun_t* fx_result)
{
   fx_result->df_name = *r_df_name;
   FX_COPY_PTR(r_df_templ_args, &fx_result->df_templ_args);
   FX_COPY_PTR(r_df_args, &fx_result->df_args);
   FX_COPY_PTR(r_df_typ, &fx_result->df_typ);
   FX_COPY_PTR(r_df_body, &fx_result->df_body);
   fx_result->df_flags = *r_df_flags;
   FX_COPY_PTR(r_df_scope, &fx_result->df_scope);
   fx_result->df_loc = *r_df_loc;
   FX_COPY_PTR(r_df_templ_inst, &fx_result->df_templ_inst);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(r_df_env, &fx_result->df_env);
}

static void _fx_free_rR13Ast__deffun_t(struct _fx_rR13Ast__deffun_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR13Ast__deffun_t, _fx_free_R13Ast__deffun_t);
}

static int _fx_make_rR13Ast__deffun_t(struct _fx_R13Ast__deffun_t* arg, struct _fx_rR13Ast__deffun_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR13Ast__deffun_t, _fx_copy_R13Ast__deffun_t);
}

static void _fx_free_R13Ast__defexn_t(struct _fx_R13Ast__defexn_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->dexn_typ);
   fx_free_list_simple(&dst->dexn_scope);
}

static void _fx_copy_R13Ast__defexn_t(struct _fx_R13Ast__defexn_t* src, struct _fx_R13Ast__defexn_t* dst)
{
   dst->dexn_name = src->dexn_name;
   FX_COPY_PTR(src->dexn_typ, &dst->dexn_typ);
   FX_COPY_PTR(src->dexn_scope, &dst->dexn_scope);
   dst->dexn_loc = src->dexn_loc;
}

static void _fx_make_R13Ast__defexn_t(
   struct _fx_R9Ast__id_t* r_dexn_name,
   struct _fx_N10Ast__typ_t_data_t* r_dexn_typ,
   struct _fx_LN12Ast__scope_t_data_t* r_dexn_scope,
   struct _fx_R10Ast__loc_t* r_dexn_loc,
   struct _fx_R13Ast__defexn_t* fx_result)
{
   fx_result->dexn_name = *r_dexn_name;
   FX_COPY_PTR(r_dexn_typ, &fx_result->dexn_typ);
   FX_COPY_PTR(r_dexn_scope, &fx_result->dexn_scope);
   fx_result->dexn_loc = *r_dexn_loc;
}

static void _fx_free_rR13Ast__defexn_t(struct _fx_rR13Ast__defexn_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR13Ast__defexn_t, _fx_free_R13Ast__defexn_t);
}

static int _fx_make_rR13Ast__defexn_t(struct _fx_R13Ast__defexn_t* arg, struct _fx_rR13Ast__defexn_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR13Ast__defexn_t, _fx_copy_R13Ast__defexn_t);
}

static void _fx_free_R13Ast__deftyp_t(struct _fx_R13Ast__deftyp_t* dst)
{
   fx_free_list_simple(&dst->dt_templ_args);
   _fx_free_N10Ast__typ_t(&dst->dt_typ);
   fx_free_list_simple(&dst->dt_scope);
}

static void _fx_copy_R13Ast__deftyp_t(struct _fx_R13Ast__deftyp_t* src, struct _fx_R13Ast__deftyp_t* dst)
{
   dst->dt_name = src->dt_name;
   FX_COPY_PTR(src->dt_templ_args, &dst->dt_templ_args);
   FX_COPY_PTR(src->dt_typ, &dst->dt_typ);
   dst->dt_finalized = src->dt_finalized;
   FX_COPY_PTR(src->dt_scope, &dst->dt_scope);
   dst->dt_loc = src->dt_loc;
}

static void _fx_make_R13Ast__deftyp_t(
   struct _fx_R9Ast__id_t* r_dt_name,
   struct _fx_LR9Ast__id_t_data_t* r_dt_templ_args,
   struct _fx_N10Ast__typ_t_data_t* r_dt_typ,
   bool r_dt_finalized,
   struct _fx_LN12Ast__scope_t_data_t* r_dt_scope,
   struct _fx_R10Ast__loc_t* r_dt_loc,
   struct _fx_R13Ast__deftyp_t* fx_result)
{
   fx_result->dt_name = *r_dt_name;
   FX_COPY_PTR(r_dt_templ_args, &fx_result->dt_templ_args);
   FX_COPY_PTR(r_dt_typ, &fx_result->dt_typ);
   fx_result->dt_finalized = r_dt_finalized;
   FX_COPY_PTR(r_dt_scope, &fx_result->dt_scope);
   fx_result->dt_loc = *r_dt_loc;
}

static void _fx_free_rR13Ast__deftyp_t(struct _fx_rR13Ast__deftyp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR13Ast__deftyp_t, _fx_free_R13Ast__deftyp_t);
}

static int _fx_make_rR13Ast__deftyp_t(struct _fx_R13Ast__deftyp_t* arg, struct _fx_rR13Ast__deftyp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR13Ast__deftyp_t, _fx_copy_R13Ast__deftyp_t);
}

static void _fx_free_T2R9Ast__id_tN10Ast__typ_t(struct _fx_T2R9Ast__id_tN10Ast__typ_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN10Ast__typ_t(
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* src,
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN10Ast__typ_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN10Ast__typ_t(struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__typ_t, _fx_free_T2R9Ast__id_tN10Ast__typ_t);
}

static int _fx_cons_LT2R9Ast__id_tN10Ast__typ_t(
   struct _fx_T2R9Ast__id_tN10Ast__typ_t* hd,
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__typ_t, _fx_copy_T2R9Ast__id_tN10Ast__typ_t);
}

static int _fx_cons_LTa2R9Ast__id_t(
   struct _fx_Ta2R9Ast__id_t* hd,
   struct _fx_LTa2R9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LTa2R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LTa2R9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_T2R9Ast__id_tLTa2R9Ast__id_t(struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLTa2R9Ast__id_t(
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* src,
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLTa2R9Ast__id_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LTa2R9Ast__id_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tLTa2R9Ast__id_t(struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tLTa2R9Ast__id_t, _fx_free_T2R9Ast__id_tLTa2R9Ast__id_t);
}

static int _fx_cons_LT2R9Ast__id_tLTa2R9Ast__id_t(
   struct _fx_T2R9Ast__id_tLTa2R9Ast__id_t* hd,
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tLTa2R9Ast__id_t, _fx_copy_T2R9Ast__id_tLTa2R9Ast__id_t);
}

static void _fx_free_R17Ast__defvariant_t(struct _fx_R17Ast__defvariant_t* dst)
{
   fx_free_list_simple(&dst->dvar_templ_args);
   _fx_free_N10Ast__typ_t(&dst->dvar_alias);
   _fx_free_LT2R9Ast__id_tN10Ast__typ_t(&dst->dvar_cases);
   fx_free_list_simple(&dst->dvar_ctors);
   _fx_free_rLR9Ast__id_t(&dst->dvar_templ_inst);
   _fx_free_LT2R9Ast__id_tLTa2R9Ast__id_t(&dst->dvar_ifaces);
   fx_free_list_simple(&dst->dvar_scope);
}

static void _fx_copy_R17Ast__defvariant_t(struct _fx_R17Ast__defvariant_t* src, struct _fx_R17Ast__defvariant_t* dst)
{
   dst->dvar_name = src->dvar_name;
   FX_COPY_PTR(src->dvar_templ_args, &dst->dvar_templ_args);
   FX_COPY_PTR(src->dvar_alias, &dst->dvar_alias);
   dst->dvar_flags = src->dvar_flags;
   FX_COPY_PTR(src->dvar_cases, &dst->dvar_cases);
   FX_COPY_PTR(src->dvar_ctors, &dst->dvar_ctors);
   FX_COPY_PTR(src->dvar_templ_inst, &dst->dvar_templ_inst);
   FX_COPY_PTR(src->dvar_ifaces, &dst->dvar_ifaces);
   FX_COPY_PTR(src->dvar_scope, &dst->dvar_scope);
   dst->dvar_loc = src->dvar_loc;
}

static void _fx_make_R17Ast__defvariant_t(
   struct _fx_R9Ast__id_t* r_dvar_name,
   struct _fx_LR9Ast__id_t_data_t* r_dvar_templ_args,
   struct _fx_N10Ast__typ_t_data_t* r_dvar_alias,
   struct _fx_R16Ast__var_flags_t* r_dvar_flags,
   struct _fx_LT2R9Ast__id_tN10Ast__typ_t_data_t* r_dvar_cases,
   struct _fx_LR9Ast__id_t_data_t* r_dvar_ctors,
   struct _fx_rLR9Ast__id_t_data_t* r_dvar_templ_inst,
   struct _fx_LT2R9Ast__id_tLTa2R9Ast__id_t_data_t* r_dvar_ifaces,
   struct _fx_LN12Ast__scope_t_data_t* r_dvar_scope,
   struct _fx_R10Ast__loc_t* r_dvar_loc,
   struct _fx_R17Ast__defvariant_t* fx_result)
{
   fx_result->dvar_name = *r_dvar_name;
   FX_COPY_PTR(r_dvar_templ_args, &fx_result->dvar_templ_args);
   FX_COPY_PTR(r_dvar_alias, &fx_result->dvar_alias);
   fx_result->dvar_flags = *r_dvar_flags;
   FX_COPY_PTR(r_dvar_cases, &fx_result->dvar_cases);
   FX_COPY_PTR(r_dvar_ctors, &fx_result->dvar_ctors);
   FX_COPY_PTR(r_dvar_templ_inst, &fx_result->dvar_templ_inst);
   FX_COPY_PTR(r_dvar_ifaces, &fx_result->dvar_ifaces);
   FX_COPY_PTR(r_dvar_scope, &fx_result->dvar_scope);
   fx_result->dvar_loc = *r_dvar_loc;
}

static void _fx_free_rR17Ast__defvariant_t(struct _fx_rR17Ast__defvariant_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17Ast__defvariant_t, _fx_free_R17Ast__defvariant_t);
}

static int _fx_make_rR17Ast__defvariant_t(
   struct _fx_R17Ast__defvariant_t* arg,
   struct _fx_rR17Ast__defvariant_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17Ast__defvariant_t, _fx_copy_R17Ast__defvariant_t);
}

static void _fx_free_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* src,
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_R16Ast__fun_flags_t* t2,
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t,
      _fx_free_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t);
}

static int _fx_cons_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t* hd,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t,
      _fx_copy_T3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t);
}

static void _fx_free_R19Ast__definterface_t(struct _fx_R19Ast__definterface_t* dst)
{
   _fx_free_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(&dst->di_new_methods);
   _fx_free_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t(&dst->di_all_methods);
   fx_free_list_simple(&dst->di_scope);
}

static void _fx_copy_R19Ast__definterface_t(struct _fx_R19Ast__definterface_t* src, struct _fx_R19Ast__definterface_t* dst)
{
   dst->di_name = src->di_name;
   dst->di_base = src->di_base;
   FX_COPY_PTR(src->di_new_methods, &dst->di_new_methods);
   FX_COPY_PTR(src->di_all_methods, &dst->di_all_methods);
   FX_COPY_PTR(src->di_scope, &dst->di_scope);
   dst->di_loc = src->di_loc;
}

static void _fx_make_R19Ast__definterface_t(
   struct _fx_R9Ast__id_t* r_di_name,
   struct _fx_R9Ast__id_t* r_di_base,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* r_di_new_methods,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR16Ast__fun_flags_t_data_t* r_di_all_methods,
   struct _fx_LN12Ast__scope_t_data_t* r_di_scope,
   struct _fx_R10Ast__loc_t* r_di_loc,
   struct _fx_R19Ast__definterface_t* fx_result)
{
   fx_result->di_name = *r_di_name;
   fx_result->di_base = *r_di_base;
   FX_COPY_PTR(r_di_new_methods, &fx_result->di_new_methods);
   FX_COPY_PTR(r_di_all_methods, &fx_result->di_all_methods);
   FX_COPY_PTR(r_di_scope, &fx_result->di_scope);
   fx_result->di_loc = *r_di_loc;
}

static void _fx_free_rR19Ast__definterface_t(struct _fx_rR19Ast__definterface_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR19Ast__definterface_t, _fx_free_R19Ast__definterface_t);
}

static int _fx_make_rR19Ast__definterface_t(
   struct _fx_R19Ast__definterface_t* arg,
   struct _fx_rR19Ast__definterface_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR19Ast__definterface_t, _fx_copy_R19Ast__definterface_t);
}

static void _fx_free_N14Ast__id_info_t(struct _fx_N14Ast__id_info_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_R13Ast__defval_t(&dst->u.IdDVal); break;
   case 3:
      _fx_free_rR13Ast__deffun_t(&dst->u.IdFun); break;
   case 4:
      _fx_free_rR13Ast__defexn_t(&dst->u.IdExn); break;
   case 5:
      _fx_free_rR13Ast__deftyp_t(&dst->u.IdTyp); break;
   case 6:
      _fx_free_rR17Ast__defvariant_t(&dst->u.IdVariant); break;
   case 7:
      _fx_free_rR19Ast__definterface_t(&dst->u.IdInterface); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14Ast__id_info_t(struct _fx_N14Ast__id_info_t* src, struct _fx_N14Ast__id_info_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_R13Ast__defval_t(&src->u.IdDVal, &dst->u.IdDVal); break;
   case 3:
      FX_COPY_PTR(src->u.IdFun, &dst->u.IdFun); break;
   case 4:
      FX_COPY_PTR(src->u.IdExn, &dst->u.IdExn); break;
   case 5:
      FX_COPY_PTR(src->u.IdTyp, &dst->u.IdTyp); break;
   case 6:
      FX_COPY_PTR(src->u.IdVariant, &dst->u.IdVariant); break;
   case 7:
      FX_COPY_PTR(src->u.IdInterface, &dst->u.IdInterface); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T3iA1N14Ast__id_info_tN14Ast__id_info_t(struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* dst)
{
   fx_free_arr(&dst->t1);
   _fx_free_N14Ast__id_info_t(&dst->t2);
}

static void _fx_copy_T3iA1N14Ast__id_info_tN14Ast__id_info_t(
   struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* src,
   struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* dst)
{
   dst->t0 = src->t0;
   fx_copy_arr(&src->t1, &dst->t1);
   _fx_copy_N14Ast__id_info_t(&src->t2, &dst->t2);
}

static void _fx_make_T3iA1N14Ast__id_info_tN14Ast__id_info_t(
   int_ t0,
   fx_arr_t* t1,
   struct _fx_N14Ast__id_info_t* t2,
   struct _fx_T3iA1N14Ast__id_info_tN14Ast__id_info_t* fx_result)
{
   fx_result->t0 = t0;
   fx_copy_arr(t1, &fx_result->t1);
   _fx_copy_N14Ast__id_info_t(t2, &fx_result->t2);
}

static void _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T3iA1N14Ast__id_info_tN14Ast__id_info_t(&(*dst)->u.t); fx_free(*dst);
   }
   *dst = 0;
}

static void
   _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->t1);
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->t4);
}

static void
   _fx_copy_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      src,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_N12Map__color_t* t0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_R9Ast__id_t* t3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t4,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   fx_result->t3 = *t3;
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
         &(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_LN16Ast__env_entry_t(struct _fx_LN16Ast__env_entry_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN16Ast__env_entry_t, _fx_free_N16Ast__env_entry_t);
}

static int _fx_cons_LN16Ast__env_entry_t(
   struct _fx_N16Ast__env_entry_t_data_t* hd,
   struct _fx_LN16Ast__env_entry_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN16Ast__env_entry_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN16Ast__env_entry_t, FX_COPY_PTR);
}

static void
   _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(&dst->t1);
   _fx_free_LN16Ast__env_entry_t(&dst->t3);
   _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(&dst->t4);
}

static void
   _fx_copy_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      src,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_N12Map__color_t* t0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_LN16Ast__env_entry_t_data_t* t3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t* t4,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t*
      fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_tR9Ast__id_tLN16Ast__env_entry_tNt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t(
         &(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* src,
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* r_root,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(
   struct _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* dst)
{
   _fx_free_Nt11Set__tree_t1S(&dst->t1);
   fx_free_str(&dst->t2);
   _fx_free_Nt11Set__tree_t1S(&dst->t3);
}

static void _fx_copy_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(
   struct _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* src,
   struct _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   fx_copy_str(&src->t2, &dst->t2);
   FX_COPY_PTR(src->t3, &dst->t3);
}

static void _fx_make_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(
   struct _fx_N12Set__color_t* t0,
   struct _fx_Nt11Set__tree_t1S_data_t* t1,
   fx_str_t* t2,
   struct _fx_Nt11Set__tree_t1S_data_t* t3,
   struct _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_copy_str(t2, &fx_result->t2);
   FX_COPY_PTR(t3, &fx_result->t3);
}

static void _fx_free_Nt11Set__tree_t1S(struct _fx_Nt11Set__tree_t1S_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&(*dst)->u.Node); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* dst)
{
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->t1);
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->t3);
}

static void _fx_copy_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* src,
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
}

static void _fx_make_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(
   struct _fx_N12Set__color_t* t0,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t3,
   struct _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
}

static void _fx_free_Nt11Set__tree_t1R9Ast__id_t(struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t(&(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt6Set__t1S(struct _fx_Rt6Set__t1S* dst)
{
   _fx_free_Nt11Set__tree_t1S(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Set__t1S(struct _fx_Rt6Set__t1S* src, struct _fx_Rt6Set__t1S* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   dst->size = src->size;
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Set__t1S(
   struct _fx_Nt11Set__tree_t1S_data_t* r_root,
   int_ r_size,
   struct _fx_FPi2SS* r_cmp,
   struct _fx_Rt6Set__t1S* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   fx_result->size = r_size;
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_Rt6Set__t1R9Ast__id_t(struct _fx_Rt6Set__t1R9Ast__id_t* dst)
{
   _fx_free_Nt11Set__tree_t1R9Ast__id_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Set__t1R9Ast__id_t(struct _fx_Rt6Set__t1R9Ast__id_t* src, struct _fx_Rt6Set__t1R9Ast__id_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   dst->size = src->size;
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Set__t1R9Ast__id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* r_root,
   int_ r_size,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   fx_result->size = r_size;
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_T2Nt11Set__tree_t1Si(struct _fx_T2Nt11Set__tree_t1Si* dst)
{
   _fx_free_Nt11Set__tree_t1S(&dst->t0);
}

static void _fx_copy_T2Nt11Set__tree_t1Si(struct _fx_T2Nt11Set__tree_t1Si* src, struct _fx_T2Nt11Set__tree_t1Si* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Set__tree_t1Si(
   struct _fx_Nt11Set__tree_t1S_data_t* t0,
   int_ t1,
   struct _fx_T2Nt11Set__tree_t1Si* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T2Nt11Set__tree_t1SB(struct _fx_T2Nt11Set__tree_t1SB* dst)
{
   _fx_free_Nt11Set__tree_t1S(&dst->t0);
}

static void _fx_copy_T2Nt11Set__tree_t1SB(struct _fx_T2Nt11Set__tree_t1SB* src, struct _fx_T2Nt11Set__tree_t1SB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Set__tree_t1SB(
   struct _fx_Nt11Set__tree_t1S_data_t* t0,
   bool t1,
   struct _fx_T2Nt11Set__tree_t1SB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* src, struct _fx_T2R10Ast__loc_tS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2R10Ast__loc_tS(struct _fx_R10Ast__loc_t* t0, fx_str_t* t1, struct _fx_T2R10Ast__loc_tS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static void _fx_free_N10Ast__lit_t(struct _fx_N10Ast__lit_t* dst)
{
   switch (dst->tag) {
   case 5:
      fx_free_str(&dst->u.LitString); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N10Ast__lit_t(struct _fx_N10Ast__lit_t* src, struct _fx_N10Ast__lit_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 5:
      fx_copy_str(&src->u.LitString, &dst->u.LitString); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_rNt6option1N10Ast__typ_t(struct _fx_rNt6option1N10Ast__typ_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rNt6option1N10Ast__typ_t, _fx_free_Nt6option1N10Ast__typ_t);
}

static int _fx_make_rNt6option1N10Ast__typ_t(
   struct _fx_Nt6option1N10Ast__typ_t_data_t* arg,
   struct _fx_rNt6option1N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rNt6option1N10Ast__typ_t, FX_COPY_PTR);
}

static void _fx_free_LN10Ast__typ_t(struct _fx_LN10Ast__typ_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN10Ast__typ_t, _fx_free_N10Ast__typ_t);
}

static int _fx_cons_LN10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* hd,
   struct _fx_LN10Ast__typ_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN10Ast__typ_t, FX_COPY_PTR);
}

static void _fx_free_T2LN10Ast__typ_tN10Ast__typ_t(struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* dst)
{
   _fx_free_LN10Ast__typ_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T2LN10Ast__typ_tN10Ast__typ_t(
   struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* src,
   struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN10Ast__typ_tN10Ast__typ_t(
   struct _fx_LN10Ast__typ_t_data_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_T2LN10Ast__typ_tN10Ast__typ_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN10Ast__typ_t(struct _fx_T2iN10Ast__typ_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T2iN10Ast__typ_t(struct _fx_T2iN10Ast__typ_t* src, struct _fx_T2iN10Ast__typ_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN10Ast__typ_t(int_ t0, struct _fx_N10Ast__typ_t_data_t* t1, struct _fx_T2iN10Ast__typ_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* dst)
{
   _fx_free_R16Ast__val_flags_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t2);
   _fx_free_N10Ast__exp_t(&dst->t3);
}

static void _fx_copy_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* src,
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* dst)
{
   _fx_copy_R16Ast__val_flags_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   FX_COPY_PTR(src->t3, &dst->t3);
}

static void _fx_make_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_R16Ast__val_flags_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_N10Ast__typ_t_data_t* t2,
   struct _fx_N10Ast__exp_t_data_t* t3,
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* fx_result)
{
   _fx_copy_R16Ast__val_flags_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   FX_COPY_PTR(t3, &fx_result->t3);
}

static void _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t,
      _fx_free_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t);
}

static int _fx_cons_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(
   struct _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* hd,
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t,
      _fx_copy_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t);
}

static void _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* dst)
{
   _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&dst->t0);
}

static void _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* src,
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t_data_t* t0,
   bool t1,
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB,
      _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB);
}

static int _fx_make_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* arg,
   struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB,
      _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB);
}

static void _fx_free_T2LN10Ast__typ_tR9Ast__id_t(struct _fx_T2LN10Ast__typ_tR9Ast__id_t* dst)
{
   _fx_free_LN10Ast__typ_t(&dst->t0);
}

static void _fx_copy_T2LN10Ast__typ_tR9Ast__id_t(
   struct _fx_T2LN10Ast__typ_tR9Ast__id_t* src,
   struct _fx_T2LN10Ast__typ_tR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LN10Ast__typ_tR9Ast__id_t(
   struct _fx_LN10Ast__typ_t_data_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_T2LN10Ast__typ_tR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 1:
         _fx_free_rNt6option1N10Ast__typ_t(&(*dst)->u.TypVar); break;
      case 2:
         _fx_free_Nt6option1N10Ast__typ_t(&(*dst)->u.TypVarTuple); break;
      case 3:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypVarArray); break;
      case 14:
         _fx_free_T2LN10Ast__typ_tN10Ast__typ_t(&(*dst)->u.TypFun); break;
      case 15:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypList); break;
      case 16:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypVector); break;
      case 17:
         _fx_free_LN10Ast__typ_t(&(*dst)->u.TypTuple); break;
      case 18:
         _fx_free_N10Ast__typ_t(&(*dst)->u.TypRef); break;
      case 19:
         _fx_free_T2iN10Ast__typ_t(&(*dst)->u.TypArray); break;
      case 20:
         _fx_free_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&(*dst)->u.TypRecord); break;
      case 24:
         _fx_free_T2LN10Ast__typ_tR9Ast__id_t(&(*dst)->u.TypApp); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 27:
         _fx_free_N13Ast__binary_t(&(*dst)->u.OpAugBinary); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t0);
}

static void _fx_copy_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(
   struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__typ_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t0);
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t1);
   _fx_free_Nt6option1N10Ast__exp_t(&dst->t2);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t0,
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t1,
   struct _fx_Nt6option1N10Ast__exp_t_data_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__lit_t(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_copy_N10Ast__lit_t(&src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__lit_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N10Ast__lit_t(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N13Ast__binary_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_N10Ast__exp_t(&dst->t2);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N13Ast__binary_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_N10Ast__exp_t_data_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N12Ast__unary_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_LN10Ast__exp_t(struct _fx_LN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN10Ast__exp_t, _fx_free_N10Ast__exp_t);
}

static int _fx_cons_LN10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* hd,
   struct _fx_LN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN10Ast__exp_t, FX_COPY_PTR);
}

static void _fx_free_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N13Ast__intrin_t* t0,
   struct _fx_LN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2R9Ast__id_tN10Ast__exp_t(struct _fx_T2R9Ast__id_tN10Ast__exp_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN10Ast__exp_t(
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* src,
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN10Ast__exp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__exp_t(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_LN10Ast__exp_t_data_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LLN10Ast__exp_t(struct _fx_LLN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LLN10Ast__exp_t, _fx_free_LN10Ast__exp_t);
}

static int _fx_cons_LLN10Ast__exp_t(
   struct _fx_LN10Ast__exp_t_data_t* hd,
   struct _fx_LLN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LLN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LLN10Ast__exp_t, FX_COPY_PTR);
}

static void _fx_free_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LLN10Ast__exp_t(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_LLN10Ast__exp_t_data_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN10Ast__exp_t(struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__exp_t, _fx_free_T2R9Ast__id_tN10Ast__exp_t);
}

static int _fx_cons_LT2R9Ast__id_tN10Ast__exp_t(
   struct _fx_T2R9Ast__id_tN10Ast__exp_t* hd,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__exp_t, _fx_copy_T2R9Ast__id_tN10Ast__exp_t);
}

static void _fx_free_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LT2R9Ast__id_tN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_LN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LN10Ast__exp_t(&dst->t3);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t4);
}

static void _fx_copy_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t4, &dst->t4);
}

static void _fx_make_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N13Ast__border_t* t1,
   struct _fx_N18Ast__interpolate_t* t2,
   struct _fx_LN10Ast__exp_t_data_t* t3,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t4,
   struct _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t4, &fx_result->t4);
}

static void _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2N10Ast__exp_tR10Ast__loc_t(struct _fx_T2N10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__exp_tR10Ast__loc_t(
   struct _fx_T2N10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__exp_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_N10Ast__exp_t(&dst->t2);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_N10Ast__exp_t_data_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2N10Ast__pat_tN10Ast__exp_t(struct _fx_T2N10Ast__pat_tN10Ast__exp_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T2N10Ast__pat_tN10Ast__exp_t(
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* src,
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2N10Ast__pat_tN10Ast__exp_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2N10Ast__pat_tN10Ast__exp_t, _fx_free_T2N10Ast__pat_tN10Ast__exp_t);
}

static int _fx_cons_LT2N10Ast__pat_tN10Ast__exp_t(
   struct _fx_T2N10Ast__pat_tN10Ast__exp_t* hd,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2N10Ast__pat_tN10Ast__exp_t, _fx_copy_T2N10Ast__pat_tN10Ast__exp_t);
}

static void _fx_free_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__pat_t(&dst->t1);
   _fx_free_N10Ast__exp_t(&dst->t2);
}

static void _fx_copy_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* src,
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   dst->t3 = src->t3;
   dst->t4 = src->t4;
}

static void _fx_make_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_N10Ast__exp_t_data_t* t2,
   struct _fx_R16Ast__for_flags_t* t3,
   struct _fx_R10Ast__loc_t* t4,
   struct _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   fx_result->t3 = *t3;
   fx_result->t4 = *t4;
}

static void _fx_free_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* dst)
{
   _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* src,
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t, _fx_free_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t);
}

static int _fx_cons_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(
   struct _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* hd,
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t, _fx_copy_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t);
}

static void
   _fx_free_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t3);
}

static void
   _fx_copy_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void
   _fx_make_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R16Ast__for_flags_t* t2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t3,
   struct _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__exp_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__exp_t_data_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2ST2N10Ast__typ_tR10Ast__loc_t(struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2ST2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2ST2N10Ast__typ_tR10Ast__loc_t(
   fx_str_t* t0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t1,
   struct _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3SST2N10Ast__typ_tR10Ast__loc_t(struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   fx_free_str(&dst->t1);
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3SST2N10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   fx_copy_str(&src->t1, &dst->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3SST2N10Ast__typ_tR10Ast__loc_t(
   fx_str_t* t0,
   fx_str_t* t1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* t2,
   struct _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_copy_str(t1, &fx_result->t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
   _fx_free_R16Ast__val_flags_t(&dst->t2);
}

static void _fx_copy_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* src,
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_R16Ast__val_flags_t(&src->t2, &dst->t2);
   dst->t3 = src->t3;
}

static void _fx_make_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R16Ast__val_flags_t* t2,
   struct _fx_R10Ast__loc_t* t3,
   struct _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_R16Ast__val_flags_t(t2, &fx_result->t2);
   fx_result->t3 = *t3;
}

static int _fx_cons_LT2iR9Ast__id_t(
   struct _fx_T2iR9Ast__id_t* hd,
   struct _fx_LT2iR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2iR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2iR9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_T2LT2iR9Ast__id_tR10Ast__loc_t(struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* dst)
{
   fx_free_list_simple(&dst->t0);
}

static void _fx_copy_T2LT2iR9Ast__id_tR10Ast__loc_t(
   struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* src,
   struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LT2iR9Ast__id_tR10Ast__loc_t(
   struct _fx_LT2iR9Ast__id_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LT2iR9Ast__id_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T3iLR9Ast__id_tR10Ast__loc_t(struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T3iLR9Ast__id_tR10Ast__loc_t(
   struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* src,
   struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3iLR9Ast__id_tR10Ast__loc_t(
   int_ t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3iLR9Ast__id_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2LSR10Ast__loc_t(struct _fx_T2LSR10Ast__loc_t* dst)
{
   _fx_free_LS(&dst->t0);
}

static void _fx_copy_T2LSR10Ast__loc_t(struct _fx_T2LSR10Ast__loc_t* src, struct _fx_T2LSR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LSR10Ast__loc_t(
   struct _fx_LS_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LSR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_N10Ast__exp_t(struct _fx_N10Ast__exp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 4:
         _fx_free_T2Nt6option1N10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpReturn); break;
      case 5:
         _fx_free_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
            &(*dst)->u.ExpRange);
         break;
      case 6:
         _fx_free_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpLit); break;
      case 7:
         _fx_free_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpIdent); break;
      case 8:
         _fx_free_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpBinary); break;
      case 9:
         _fx_free_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpUnary); break;
      case 10:
         _fx_free_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpIntrin); break;
      case 11:
         _fx_free_T2R9Ast__id_tN10Ast__exp_t(&(*dst)->u.ExpSync); break;
      case 12:
         _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpSeq); break;
      case 13:
         _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkTuple); break;
      case 14:
         _fx_free_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkArray); break;
      case 15:
         _fx_free_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkVector); break;
      case 16:
         _fx_free_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMkRecord); break;
      case 17:
         _fx_free_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpUpdateRecord); break;
      case 18:
         _fx_free_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpCall); break;
      case 19:
         _fx_free_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(
            &(*dst)->u.ExpAt);
         break;
      case 20:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpAssign); break;
      case 21:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMem); break;
      case 22:
         _fx_free_T2N10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpThrow); break;
      case 23:
         _fx_free_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpIf); break;
      case 24:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpWhile); break;
      case 25:
         _fx_free_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.ExpDoWhile); break;
      case 26:
         _fx_free_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t(&(*dst)->u.ExpFor);
         break;
      case 27:
         _fx_free_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t(
            &(*dst)->u.ExpMap);
         break;
      case 28:
         _fx_free_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpTryCatch); break;
      case 29:
         _fx_free_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpMatch); break;
      case 30:
         _fx_free_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpCast); break;
      case 31:
         _fx_free_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpTyped); break;
      case 32:
         _fx_free_T2ST2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpCCode); break;
      case 33:
         _fx_free_T3SST2N10Ast__typ_tR10Ast__loc_t(&(*dst)->u.ExpData); break;
      case 34:
         _fx_free_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t(&(*dst)->u.DefVal); break;
      case 35:
         _fx_free_rR13Ast__deffun_t(&(*dst)->u.DefFun); break;
      case 36:
         _fx_free_rR13Ast__defexn_t(&(*dst)->u.DefExn); break;
      case 37:
         _fx_free_rR13Ast__deftyp_t(&(*dst)->u.DefTyp); break;
      case 38:
         _fx_free_rR17Ast__defvariant_t(&(*dst)->u.DefVariant); break;
      case 39:
         _fx_free_rR19Ast__definterface_t(&(*dst)->u.DefInterface); break;
      case 40:
         _fx_free_T2LT2iR9Ast__id_tR10Ast__loc_t(&(*dst)->u.DirImport); break;
      case 41:
         _fx_free_T3iLR9Ast__id_tR10Ast__loc_t(&(*dst)->u.DirImportFrom); break;
      case 42:
         _fx_free_T2LSR10Ast__loc_t(&(*dst)->u.DirPragma); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2N10Ast__lit_tR10Ast__loc_t(struct _fx_T2N10Ast__lit_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__lit_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__lit_tR10Ast__loc_t(
   struct _fx_T2N10Ast__lit_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__lit_tR10Ast__loc_t* dst)
{
   _fx_copy_N10Ast__lit_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__lit_tR10Ast__loc_t(
   struct _fx_N10Ast__lit_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__lit_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N10Ast__lit_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2LN10Ast__pat_tR10Ast__loc_t(struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__pat_t(&dst->t0);
}

static void _fx_copy_T2LN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LN10Ast__pat_tR10Ast__loc_t(
   struct _fx_LN10Ast__pat_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2LN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_LN10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LN10Ast__pat_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2R9Ast__id_tN10Ast__pat_t(struct _fx_T2R9Ast__id_tN10Ast__pat_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN10Ast__pat_t(
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* src,
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN10Ast__pat_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN10Ast__pat_t(struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__pat_t, _fx_free_T2R9Ast__id_tN10Ast__pat_t);
}

static int _fx_cons_LT2R9Ast__id_tN10Ast__pat_t(
   struct _fx_T2R9Ast__id_tN10Ast__pat_t* hd,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN10Ast__pat_t, _fx_copy_T2R9Ast__id_tN10Ast__pat_t);
}

static void _fx_free_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_LT2R9Ast__id_tN10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_Nt6option1R9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__pat_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__pat_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
}

static void _fx_copy_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
   _fx_free_N10Ast__exp_t(&dst->t1);
}

static void _fx_copy_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* src,
   struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_N10Ast__exp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2N10Ast__pat_tR10Ast__loc_t(struct _fx_T2N10Ast__pat_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__pat_t(&dst->t0);
}

static void _fx_copy_T2N10Ast__pat_tR10Ast__loc_t(
   struct _fx_T2N10Ast__pat_tR10Ast__loc_t* src,
   struct _fx_T2N10Ast__pat_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N10Ast__pat_tR10Ast__loc_t(
   struct _fx_N10Ast__pat_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N10Ast__pat_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_N10Ast__pat_t(struct _fx_N10Ast__pat_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 2:
         _fx_free_T2N10Ast__lit_tR10Ast__loc_t(&(*dst)->u.PatLit); break;
      case 4:
         _fx_free_T2LN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatTuple); break;
      case 5:
         _fx_free_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatVariant); break;
      case 6:
         _fx_free_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatRecord); break;
      case 7:
         _fx_free_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatCons); break;
      case 8:
         _fx_free_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t(&(*dst)->u.PatAs); break;
      case 9:
         _fx_free_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t(&(*dst)->u.PatTyped); break;
      case 10:
         _fx_free_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t(&(*dst)->u.PatWhen); break;
      case 11:
         _fx_free_T2LN10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatAlt); break;
      case 12:
         _fx_free_T2N10Ast__pat_tR10Ast__loc_t(&(*dst)->u.PatRef); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_N16Ast__env_entry_t(struct _fx_N16Ast__env_entry_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) { case 2:     _fx_free_N10Ast__typ_t(&(*dst)->u.EnvTyp); break; default:    ; } fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
}

static void _fx_copy_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* src, struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2SR10Ast__loc_t(fx_str_t* t0, struct _fx_R10Ast__loc_t* t1, struct _fx_T2SR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_LT2SR10Ast__loc_t(struct _fx_LT2SR10Ast__loc_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_free_T2SR10Ast__loc_t);
}

static int _fx_cons_LT2SR10Ast__loc_t(
   struct _fx_T2SR10Ast__loc_t* hd,
   struct _fx_LT2SR10Ast__loc_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2SR10Ast__loc_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_copy_T2SR10Ast__loc_t);
}

static void _fx_free_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* dst)
{
   _fx_free_LT2SR10Ast__loc_t(&dst->pragma_clibs);
}

static void _fx_copy_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* src, struct _fx_R14Ast__pragmas_t* dst)
{
   dst->pragma_cpp = src->pragma_cpp;
   FX_COPY_PTR(src->pragma_clibs, &dst->pragma_clibs);
}

static void _fx_make_R14Ast__pragmas_t(
   bool r_pragma_cpp,
   struct _fx_LT2SR10Ast__loc_t_data_t* r_pragma_clibs,
   struct _fx_R14Ast__pragmas_t* fx_result)
{
   fx_result->pragma_cpp = r_pragma_cpp;
   FX_COPY_PTR(r_pragma_clibs, &fx_result->pragma_clibs);
}

static int _fx_cons_Li(int_ hd, struct _fx_Li_data_t* tl, bool addref_tl, struct _fx_Li_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_Li, FX_COPY_SIMPLE);
}

static void _fx_free_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t* dst)
{
   fx_free_str(&dst->t1);
   _fx_free_LN10Ast__exp_t(&dst->t4);
   fx_free_list_simple(&dst->t5);
   _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&dst->t6);
   _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(&dst->t9);
}

static void _fx_copy_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t* src,
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   FX_COPY_PTR(src->t4, &dst->t4);
   FX_COPY_PTR(src->t5, &dst->t5);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&src->t6, &dst->t6);
   dst->t7 = src->t7;
   dst->t8 = src->t8;
   FX_COPY_PTR(src->t9, &dst->t9);
}

static void _fx_make_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_R9Ast__id_t* t0,
   fx_str_t* t1,
   int_ t2,
   bool t3,
   struct _fx_LN10Ast__exp_t_data_t* t4,
   struct _fx_Li_data_t* t5,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* t6,
   bool t7,
   int_ t8,
   struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t* t9,
   struct _fx_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t*
      fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
   fx_result->t2 = t2;
   fx_result->t3 = t3;
   FX_COPY_PTR(t4, &fx_result->t4);
   FX_COPY_PTR(t5, &fx_result->t5);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(t6, &fx_result->t6);
   fx_result->t7 = t7;
   fx_result->t8 = t8;
   FX_COPY_PTR(t9, &fx_result->t9);
}

static void _fx_free_N16Ast__defmodule_t(struct _fx_N16Ast__defmodule_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T10R9Ast__id_tSiBLN10Ast__exp_tLiRt6Map__t2R9Ast__id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
         &(*dst)->u.defmodule_t);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2LSi(struct _fx_T2LSi* dst)
{
   _fx_free_LS(&dst->t0);
}

static void _fx_copy_T2LSi(struct _fx_T2LSi* src, struct _fx_T2LSi* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2LSi(struct _fx_LS_data_t* t0, int_ t1, struct _fx_T2LSi* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T2R9Ast__id_tT2LSi(struct _fx_T2R9Ast__id_tT2LSi* dst)
{
   _fx_free_T2LSi(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tT2LSi(struct _fx_T2R9Ast__id_tT2LSi* src, struct _fx_T2R9Ast__id_tT2LSi* dst)
{
   dst->t0 = src->t0;
   _fx_copy_T2LSi(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tT2LSi(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_T2LSi* t1,
   struct _fx_T2R9Ast__id_tT2LSi* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_T2LSi(t1, &fx_result->t1);
}

static int _fx_cons_LR10Ast__loc_t(
   struct _fx_R10Ast__loc_t* hd,
   struct _fx_LR10Ast__loc_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR10Ast__loc_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR10Ast__loc_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_LE(struct _fx_LE_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LE, fx_free_exn);
}

static int _fx_cons_LE(fx_exn_t* hd, struct _fx_LE_data_t* tl, bool addref_tl, struct _fx_LE_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LE, fx_copy_exn);
}

static void _fx_free_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t* dst)
{
   _fx_free_N10Ast__typ_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N10Ast__typ_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t(struct _fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t, _fx_free_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t);
}

static int _fx_cons_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t* hd,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t, _fx_copy_T3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t);
}

static void _fx_free_Ta2S(struct _fx_Ta2S* dst)
{
   fx_free_str(&dst->t0);
   fx_free_str(&dst->t1);
}

static void _fx_copy_Ta2S(struct _fx_Ta2S* src, struct _fx_Ta2S* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_Ta2S(fx_str_t* t0, fx_str_t* t1, struct _fx_Ta2S* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_copy_str(t1, &fx_result->t1);
}

static int _fx_make_rB(bool arg, struct _fx_rB_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rB, FX_COPY_SIMPLE);
}

_fx_Nt6option1Nt10Hashset__t1R9Ast__id_t _fx_g9Ast__None = { 1 };
_fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t _fx_g11Ast__None1_ = 0;
_fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t _fx_g11Ast__None2_ = 0;
_fx_Nt6option1N10Ast__exp_t _fx_g11Ast__None3_ = 0;
_fx_Nt6option1N10Ast__typ_t _fx_g11Ast__None4_ = 0;
_fx_Nt6option1i _fx_g11Ast__None5_ = { 1 };
_fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t _fx_g10Ast__Empty = 0;
_fx_Nt11Map__tree_t2R9Ast__id_tLN16Ast__env_entry_t _fx_g12Ast__Empty1_ = 0;
_fx_N12Set__color_t _fx_g8Ast__Red = { 1 };
_fx_N12Set__color_t _fx_g10Ast__Black = { 2 };
_fx_Nt11Set__tree_t1S _fx_g12Ast__Empty2_ = 0;
_fx_Nt11Set__tree_t1R9Ast__id_t _fx_g12Ast__Empty3_ = 0;
int _FX_EXN_E17Ast__CompileError = 0;
int _FX_EXN_E26Ast__PropagateCompileError = 0;
static _fx_N10Ast__typ_t_data_t TypInt_data_0 = { 1, 5 };
_fx_N10Ast__typ_t _fx_g11Ast__TypInt = &TypInt_data_0;
static _fx_N10Ast__typ_t_data_t TypString_data_0 = { 1, 10 };
_fx_N10Ast__typ_t _fx_g14Ast__TypString = &TypString_data_0;
static _fx_N10Ast__typ_t_data_t TypChar_data_0 = { 1, 11 };
_fx_N10Ast__typ_t _fx_g12Ast__TypChar = &TypChar_data_0;
static _fx_N10Ast__typ_t_data_t TypBool_data_0 = { 1, 12 };
_fx_N10Ast__typ_t _fx_g12Ast__TypBool = &TypBool_data_0;
static _fx_N10Ast__typ_t_data_t TypVoid_data_0 = { 1, 13 };
_fx_N10Ast__typ_t _fx_g12Ast__TypVoid = &TypVoid_data_0;
static _fx_N10Ast__typ_t_data_t TypErr_data_0 = { 1, 22 };
_fx_N10Ast__typ_t _fx_g11Ast__TypErr = &TypErr_data_0;
static _fx_N10Ast__typ_t_data_t TypCPointer_data_0 = { 1, 23 };
_fx_N10Ast__typ_t _fx_g16Ast__TypCPointer = &TypCPointer_data_0;
static _fx_N10Ast__typ_t_data_t TypDecl_data_0 = { 1, 25 };
_fx_N10Ast__typ_t _fx_g12Ast__TypDecl = &TypDecl_data_0;
static _fx_N10Ast__typ_t_data_t TypModule_data_0 = { 1, 26 };
_fx_N10Ast__typ_t _fx_g14Ast__TypModule = &TypModule_data_0;
static _fx_N13Ast__binary_t_data_t OpMul_data_0 = { 1, 3 };
_fx_N13Ast__binary_t _fx_g10Ast__OpMul = &OpMul_data_0;
static _fx_N13Ast__binary_t_data_t OpDiv_data_0 = { 1, 4 };
_fx_N13Ast__binary_t _fx_g10Ast__OpDiv = &OpDiv_data_0;
static _fx_N13Ast__binary_t_data_t OpMod_data_0 = { 1, 6 };
_fx_N13Ast__binary_t _fx_g10Ast__OpMod = &OpMod_data_0;
static _fx_N13Ast__binary_t_data_t OpPow_data_0 = { 1, 7 };
_fx_N13Ast__binary_t _fx_g10Ast__OpPow = &OpPow_data_0;
static _fx_N13Ast__binary_t_data_t OpSpaceship_data_0 = { 1, 23 };
_fx_N13Ast__binary_t _fx_g16Ast__OpSpaceship = &OpSpaceship_data_0;
_fx_N17Ast__fun_constr_t _fx_g13Ast__CtorNone = { 1 };
_fx_N15Ast__for_make_t _fx_g16Ast__ForMakeNone = { 1 };
_fx_N14Ast__id_info_t _fx_g11Ast__IdNone = { 1 };
_fx_T2LSi _fx_g16Ast__builtin_ids = {0};
_fx_R9Ast__id_t _fx_g9Ast__noid;
_fx_T2LSi _fx_g18Ast__builtin_ids1_ = {0};
_fx_R10Ast__loc_t _fx_g10Ast__noloc;
_fx_FPi2R9Ast__id_tR9Ast__id_t _fx_g11Ast__cmp_id = {0};
_fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t _fx_g14Ast__empty_env = {0};
_fx_FPi2R9Ast__id_tR9Ast__id_t _fx_g13Ast__cmp_id1_ = {0};
_fx_Rt6Set__t1R9Ast__id_t _fx_g16Ast__empty_idset = {0};
_fx_FPi2R9Ast__id_tR9Ast__id_t _fx_g13Ast__cmp_id2_ = {0};
_fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t _fx_g16Ast__empty_idmap = {0};
bool _fx_g15Ast__freeze_ids = false;
int_ _fx_g19Ast__lock_all_names = 0;
_fx_Nt9Dynvec__t1S _fx_g14Ast__all_names = 0;
_fx_Nt10Hashmap__t2Si _fx_g16Ast__all_strhash = 0;
_fx_Nt10Hashmap__t2Si _fx_g21Ast__all_modules_hash = 0;
fx_arr_t _fx_g16Ast__all_modules = {0};
_fx_Li _fx_g23Ast__all_modules_sorted = 0;
_fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t _fx_g23Ast__builtin_exceptions = {0};
_fx_LE _fx_g21Ast__all_compile_errs = 0;
_fx_LS _fx_g24Ast__all_compile_err_ctx = 0;
_fx_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t _fx_g17Ast__all_func_ctx = 0;
_fx_Nt10Hashset__t1S _fx_g19Ast__all_c_inc_dirs = 0;
_fx_FPi2SS _fx_g8Ast__cmp = {0};
_fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t _fx_g13Ast__dup_typ_ = {0};
_fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t _fx_g13Ast__dup_exp_ = {0};
_fx_R16Ast__ast_callb_t _fx_g14Ast__dup_callb = {0};
_fx_T2LSi _fx_g18Ast__builtin_ids2_ = {0};
_fx_R9Ast__id_t _fx_g23Ast__std__fold_result__;
_fx_T2LSi _fx_g18Ast__builtin_ids3_ = {0};
_fx_R9Ast__id_t _fx_g15Ast__std__tag__;
_fx_T2LSi _fx_g18Ast__builtin_ids4_ = {0};
_fx_R9Ast__id_t _fx_g16Ast__std__self__;
_fx_T2LSi _fx_g18Ast__builtin_ids5_ = {0};
_fx_R9Ast__id_t _fx_g18Ast__std__lambda__;
_fx_T2LSi _fx_g18Ast__builtin_ids6_ = {0};
_fx_R9Ast__id_t _fx_g18Ast__std__kwargs__;
_fx_T2LSi _fx_g18Ast__builtin_ids7_ = {0};
_fx_R9Ast__id_t _fx_g15Ast__std__pat__;
_fx_T2LSi _fx_g18Ast__builtin_ids8_ = {0};
_fx_R9Ast__id_t _fx_g18Ast__std__result__;
_fx_T2LSi _fx_g18Ast__builtin_ids9_ = {0};
_fx_R9Ast__id_t _fx_g16Ast__std__size__;
_fx_T2LSi _fx_g19Ast__builtin_ids10_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids11_ = {0};
_fx_R9Ast__id_t _fx_g17Ast__std__Names__;
_fx_T2LSi _fx_g19Ast__builtin_ids12_ = {0};
_fx_R9Ast__id_t _fx_g19Ast__std__Runtime__;
_fx_T2LSi _fx_g19Ast__builtin_ids13_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids14_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids15_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids16_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids17_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids18_ = {0};
_fx_T2LSi _fx_g19Ast__builtin_ids19_ = {0};
FX_EXTERN_C int_ _fx_F7__cmp__i2SS(fx_str_t* a, fx_str_t* b, void* fx_fv);

FX_EXTERN_C int _fx_M7HashmapFM9makeindexA1i1i(int_ size_0, fx_arr_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F9make_FailE1S(fx_str_t* arg0, fx_exn_t* fx_result);

FX_EXTERN_C uint64_t _fx_F4hashq1S(fx_str_t* x, void* fx_fv);

FX_EXTERN_C bool _fx_F6__eq__B2SS(fx_str_t* a, fx_str_t* b, void* fx_fv);

FX_EXTERN_C int _fx_F6assertv1B(bool f_0, void* fx_fv);

FX_EXTERN_C int _fx_M7HashsetFM9makeindexA1i1i(int_ size_0, fx_arr_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F7__cmp__i2ii(int_ a_0, int_ b_0, int_* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM7make_fpFPv1RM4id_t1Nt10Hashset__t1RM4id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_FPv1R9Ast__id_t* fx_result);

static int _fx_M3AstFM10__lambda__v1RM4id_t(struct _fx_R9Ast__id_t* x_0, void* fx_fv);

FX_EXTERN_C int _fx_F6stringS1i(int_ a, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F4joinS2SLS(fx_str_t* sep_0, struct _fx_LS_data_t* strs_0, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C void _fx_F12print_stringv1S(fx_str_t* a, void* fx_fv);

FX_EXTERN_C_VAL(fx_exn_t _fx_E26Ast__PropagateCompileErrorv)
FX_EXTERN_C_VAL(int _FX_EXN_E4Fail)
FX_EXTERN_C_VAL(struct _fx_R18Options__options_t _fx_g12Options__opt)
FX_EXTERN_C bool _fx_M6StringFM8endswithB2SS(fx_str_t* s, fx_str_t* suffix, void* fx_fv);

FX_EXTERN_C_VAL(struct _fx_R7File__t _fx_g12File__stdout)
FX_EXTERN_C int _fx_M4FileFM5flushv1RM1t(struct _fx_R7File__t* f, void* fx_fv);

FX_EXTERN_C int_ _fx_M6StringFM5rfindi2SC(fx_str_t* s, char_ c, void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM7typ2strS1N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t* t_0, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F6stringS1l(int64_t a, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F6stringS1q(uint64_t a, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F6stringS1f(float a, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C bool _fx_M6StringFM8containsB2SC(fx_str_t* s, char_ c, void* fx_fv);

FX_EXTERN_C int _fx_F6stringS1d(double a, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M6StringFM7escapedS2SB(fx_str_t* s_0, bool quotes_0, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F6stringS1C(char_ c, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM6tl2strS1LN10Ast__typ_t(struct _fx_LN10Ast__typ_t_data_t* tl_0, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_F12join_embraceS4SSSA1S(
   fx_str_t* begin,
   fx_str_t* end,
   fx_str_t* sep,
   fx_arr_t* strs,
   fx_str_t* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_F7__mul__S2Ci(char_ c, int_ n, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C bool _fx_M6StringFM10startswithB2SS(fx_str_t* s, fx_str_t* prefix, void* fx_fv);

FX_EXTERN_C int_ _fx_M6StringFM4findi3SSi(fx_str_t* s, fx_str_t* part, int_ from_pos, void* fx_fv);

FX_EXTERN_C int _fx_M6StringFM5stripS1S(fx_str_t* s, fx_str_t* fx_result, void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM8walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM13walk_exp_opt_Nt6option1N10Ast__exp_t2Nt6option1N10Ast__exp_tRM11ast_callb_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* e_opt_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_Nt6option1N10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg0_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* fx_result,
   void* fx_fv);

static int _fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LN10Ast__exp_t_data_t* el_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM10walk_ne_l_LT2RM4id_tN10Ast__exp_t2LT2RM4id_tN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* ne_l_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM10walk_pe_l_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* pe_l_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM11walk_cases_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* pe_l_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM11walk_plist_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(
   struct _fx_LN10Ast__pat_t_data_t* pl_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__pat_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM8walk_pl_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(
   struct _fx_LN10Ast__pat_t_data_t* pl_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__pat_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M3AstFM11walk_typ_1_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM8dup_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM7make_fpFPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1rB(
   struct _fx_rB_data_t* arg0,
   struct _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t* fx_result);

static int _fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv);

static int
   _fx_M3AstFM11update_setsNt10Hashset__t1RM4id_t5RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* all_sets_0,
   struct _fx_rB_data_t* changed_ref_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* empty_idset_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* visited_ids_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv);

static int
   _fx_M3AstFM10__lambda__v7RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tRM4id_tNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
   struct _fx_R9Ast__id_t* m_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* all_sets_0,
   struct _fx_rB_data_t* changed_ref_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* empty_idset_0,
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* set_n_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* visited_ids_0,
   void* fx_fv);

fx_exn_info_t _fx_E17Ast__CompileError_info = {0};
typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E17Ast__CompileError_data_t;

FX_EXTERN_C void _fx_free_E17Ast__CompileError(_fx_E17Ast__CompileError_data_t* dst)
{
   _fx_free_T2R10Ast__loc_tS(&dst->data);
   fx_free(dst);
}

fx_exn_info_t _fx_E26Ast__PropagateCompileError_info = {0};
fx_exn_t _fx_E26Ast__PropagateCompileErrorv = {0};
typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* t0;
} _fx_M3AstFM10__lambda__v1RM4id_t_cldata_t;

FX_EXTERN_C void _fx_free_M3AstFM10__lambda__v1RM4id_t(_fx_M3AstFM10__lambda__v1RM4id_t_cldata_t* dst)
{
   _fx_free_Nt10Hashset__t1R9Ast__id_t(&dst->t0);
   fx_free(dst);
}

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rB_data_t* t0;
} _fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t_cldata_t;

FX_EXTERN_C void _fx_free_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   _fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t_cldata_t* dst)
{
   FX_FREE_REF_SIMPLE(&dst->t0);
   fx_free(dst);
}

FX_EXTERN_C void _fx_M3AstFM4SomeNt6option1Nt10Hashset__t1RM4id_t1Nt10Hashset__t1RM4id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t* fx_result)
{
   fx_result->tag = 2;
   FX_COPY_PTR(arg0, &fx_result->u.Some);
}

FX_EXTERN_C int
   _fx_M3AstFM4SomeNt6option1FPN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t1FPN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t* arg0,
   struct _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int
   _fx_M3AstFM4SomeNt6option1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t* arg0,
   struct _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM4SomeNt6option1N10Ast__exp_t1N10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_Nt6option1N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1N10Ast__exp_t);
   FX_COPY_PTR(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* arg0,
   struct _fx_Nt6option1N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1N10Ast__typ_t);
   FX_COPY_PTR(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C void _fx_M3AstFM4SomeNt6option1i1i(int_ arg0, struct _fx_Nt6option1i* fx_result)
{
   fx_result->tag = 2;
   fx_result->u.Some = arg0;
}

FX_EXTERN_C int _fx_M3AstFM3cmpi2SS(fx_str_t* s1_0, fx_str_t* s2_0, int_* fx_result, void* fx_fv)
{
   int fx_status = 0;
   *fx_result = _fx_F7__cmp__i2SS(s1_0, s2_0, 0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM1tNt10Hashmap__t2Si6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si(
   struct _fx_Rt20Hashmap__hashentry_t2Si* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashmap__t2Si_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashmap__t2Si);
   _fx_copy_Rt20Hashmap__hashentry_t2Si(arg0, &v->u.t.t0);
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5emptyNt10Hashmap__t2Si3iSi(
   int_ size0_0,
   fx_str_t* k0_0,
   int_ d0_0,
   struct _fx_Nt10Hashmap__t2Si_data_t** fx_result,
   void* fx_fv)
{
   _fx_Rt20Hashmap__hashentry_t2Si entry0_0 = {0};
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   int fx_status = 0;
   int_ size_0 = 8;
   while (size_0 < size0_0) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_make_Rt20Hashmap__hashentry_t2Si(0ULL, k0_0, d0_0, &entry0_0);
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt20Hashmap__hashentry_t2Si* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt20Hashmap__hashentry_t2Si), (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2Si,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2Si, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt20Hashmap__hashentry_t2Si*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      _fx_copy_Rt20Hashmap__hashentry_t2Si(&entry0_0, dstptr_0);
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashmap__t2Si6Rt20Hashmap__hashentry_t2SiiiiA1iA1Rt20Hashmap__hashentry_t2Si(&entry0_0, 0, 0, 0, &v_0,
         &v_1, fx_result), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_Rt20Hashmap__hashentry_t2Si(&entry0_0);
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9add_fast_i4iA1iA1Rt20Hashmap__hashentry_t2SiRt20Hashmap__hashentry_t2Si(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt20Hashmap__hashentry_t2Si* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         _fx_Rt20Hashmap__hashentry_t2Si* v_2 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, *ht_table_0, tabsz_0);
         _fx_free_Rt20Hashmap__hashentry_t2Si(v_2);
         _fx_copy_Rt20Hashmap__hashentry_t2Si(entry_0, v_2);
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM4growv2Nt10Hashmap__t2Sii(struct _fx_Nt10Hashmap__t2Si_data_t* self_0, int_ new_size_0, void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   _fx_Rt20Hashmap__hashentry_t2Si v_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_copy_Rt20Hashmap__hashentry_t2Si(&self_0->u.t.t0, &v_0);
   _fx_Rt20Hashmap__hashentry_t2Si* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt20Hashmap__hashentry_t2Si), (fx_free_t)_fx_free_Rt20Hashmap__hashentry_t2Si,
            (fx_copy_t)_fx_copy_Rt20Hashmap__hashentry_t2Si, 0, &new_ht_table_0), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt20Hashmap__hashentry_t2Si*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      _fx_copy_Rt20Hashmap__hashentry_t2Si(&v_0, dstptr_0);
   }
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      _fx_Rt20Hashmap__hashentry_t2Si v_2 = {0};
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, ht_table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2Si(FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, ht_table_0, j_0), &v_2);
         int_ v_3;
         FX_CALL(
            _fx_M3AstFM9add_fast_i4iA1iA1Rt20Hashmap__hashentry_t2SiRt20Hashmap__hashentry_t2Si(tabsz_0, &new_ht_index_0,
               &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2Si(&v_2);
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   _fx_free_Rt20Hashmap__hashentry_t2Si(&v_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9find_idx_Ta2i2Nt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_tRM4id_t(
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)k_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)k_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)k_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   uint64_t hv_0 = __fold_result___0 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t entry_0 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_2 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_2), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, self_0->u.t.t5, v_2), &entry_0);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_3 = entry_0.key;
            bool __fold_result___1 = true;
            bool t_1;
            if (v_3.m == k_0->m) {
               t_1 = __fold_result___1;
            }
            else {
               t_1 = false;
            }
            __fold_result___1 = t_1;
            bool t_2;
            if (v_3.i == k_0->i) {
               t_2 = __fold_result___1;
            }
            else {
               t_2 = false;
            }
            __fold_result___1 = t_2;
            bool t_3;
            if (v_3.j == k_0->j) {
               t_3 = __fold_result___1;
            }
            else {
               t_3 = false;
            }
            __fold_result___1 = t_3;
            t_0 = __fold_result___1;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      _fx_free_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9find_idx_Ta2i2Nt10Hashmap__t2SiS(
   struct _fx_Nt10Hashmap__t2Si_data_t* self_0,
   fx_str_t* k_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   uint64_t v_1 = _fx_F4hashq1S(k_0, 0);
   uint64_t hv_0 = v_1 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_2 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_2; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2Si entry_0 = {0};
      fx_str_t v_3 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_4 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_4), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2Si(FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, self_0->u.t.t5, v_4), &entry_0);
         bool v_5;
         if (entry_0.hv == hv_0) {
            fx_copy_str(&entry_0.key, &v_3); v_5 = _fx_F6__eq__B2SS(&v_3, k_0, 0);
         }
         else {
            v_5 = false;
         }
         if (v_5) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_FREE_STR(&v_3);
      _fx_free_Rt20Hashmap__hashentry_t2Si(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(
   struct _fx_Nt10Hashmap__t2Si_data_t* self_0,
   fx_str_t* k_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   _fx_Rt20Hashmap__hashentry_t2Si v_2 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   uint64_t v_4 = _fx_F4hashq1S(k_0, 0);
   uint64_t hv_0 = v_4 & 9223372036854775807ULL;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(_fx_M3AstFM4growv2Nt10Hashmap__t2Sii(self_0, fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0), _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_5 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_5; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2Si entry_0 = {0};
      fx_str_t v_6 = {0};
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_7 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_7), _fx_catch_0);
         _fx_copy_Rt20Hashmap__hashentry_t2Si(FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, self_0->u.t.t5, v_7), &entry_0);
         bool v_8;
         if (entry_0.hv == hv_0) {
            fx_copy_str(&entry_0.key, &v_6); v_8 = _fx_F6__eq__B2SS(&v_6, k_0, 0);
         }
         else {
            v_8 = false;
         }
         if (v_8) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_0;
         if (tidx_0 == 1) {
            t_0 = insert_idx_0 < 0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_FREE_STR(&v_6);
      _fx_free_Rt20Hashmap__hashentry_t2Si(&entry_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_1;
      if (insert_idx_0 >= 0) {
         t_1 = insert_idx_0 != j_0;
      }
      else {
         t_1 = false;
      }
      if (t_1) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)(FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, self_0->u.t.t5, found_0)->hv & 9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      _fx_make_Rt20Hashmap__hashentry_t2Si(hv_0, k_0, self_0->u.t.t0.data, &v_2);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      _fx_Rt20Hashmap__hashentry_t2Si* v_9 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, self_0->u.t.t5, found_0);
      _fx_free_Rt20Hashmap__hashentry_t2Si(v_9);
      _fx_copy_Rt20Hashmap__hashentry_t2Si(&v_2, v_9);
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   *fx_result = found_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   _fx_free_Rt20Hashmap__hashentry_t2Si(&v_2);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM1tNt10Hashset__t1S6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(
   struct _fx_Rt24Hashset__hashset_entry_t1S* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashset__t1S_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashset__t1S);
   _fx_copy_Rt24Hashset__hashset_entry_t1S(arg0, &v->u.t.t0);
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int
   _fx_M3AstFM1tNt10Hashset__t1RM4id_t6Rt24Hashset__hashset_entry_t1RM4id_tiiiA1iA1Rt24Hashset__hashset_entry_t1RM4id_t(
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* arg0,
   int_ arg1,
   int_ arg2,
   int_ arg3,
   fx_arr_t* arg4,
   fx_arr_t* arg5,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt10Hashset__t1R9Ast__id_t);
   v->u.t.t0 = *arg0;
   v->u.t.t1 = arg1;
   v->u.t.t2 = arg2;
   v->u.t.t3 = arg3;
   fx_copy_arr(arg4, &v->u.t.t4);
   fx_copy_arr(arg5, &v->u.t.t5);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5emptyNt10Hashset__t1S2iS(
   int_ size0_0,
   fx_str_t* k0_0,
   struct _fx_Nt10Hashset__t1S_data_t** fx_result,
   void* fx_fv)
{
   _fx_Rt24Hashset__hashset_entry_t1S entry0_0 = {0};
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   int fx_status = 0;
   int_ size_0 = 8;
   while (size_0 < size0_0) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_make_Rt24Hashset__hashset_entry_t1S(0ULL, k0_0, &entry0_0);
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1S* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1S), (fx_free_t)_fx_free_Rt24Hashset__hashset_entry_t1S,
            (fx_copy_t)_fx_copy_Rt24Hashset__hashset_entry_t1S, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1S*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      _fx_copy_Rt24Hashset__hashset_entry_t1S(&entry0_0, dstptr_0);
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashset__t1S6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(&entry0_0, 0, 0, 0,
         &v_0, &v_1, fx_result), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_Rt24Hashset__hashset_entry_t1S(&entry0_0);
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1RM4id_tRt24Hashset__hashset_entry_t1RM4id_t(
   int_ tabsz_0,
   fx_arr_t* ht_index_0,
   fx_arr_t* ht_table_0,
   struct _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* entry_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_exn_t v_0 = {0};
   int fx_status = 0;
   int_ idxsz_0 = FX_ARR_SIZE(*ht_index_0, 0);
   uint64_t hv_0 = entry_0->hv;
   uint64_t perturb_0 = hv_0;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   bool found_free_slot_0 = false;
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, *ht_index_0, j_0);
      if (tidx_0 == 0) {
         FX_CHKIDX(FX_CHKIDX1(*ht_index_0, 0, j_0), _fx_catch_0);
         *FX_PTR_1D(int_, *ht_index_0, j_0) = tabsz_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(*ht_table_0, 0, tabsz_0), _fx_catch_0);
         *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, *ht_table_0, tabsz_0) = *entry_0;
         found_free_slot_0 = true;
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (!found_free_slot_0) {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   *fx_result = tabsz_0 + 1;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM4growv2Nt10Hashset__t1RM4id_ti(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   int_ new_size_0,
   void* fx_fv)
{
   fx_arr_t ht_table_0 = {0};
   fx_arr_t new_ht_table_0 = {0};
   fx_arr_t new_ht_index_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t5, &ht_table_0);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_0 = self_0->u.t.t0;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   {
      const int_ shape_0[] = { new_size_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &new_ht_table_0),
         _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)new_ht_table_0.data;
   for (int_ i_0 = 0; i_0 < new_size_0; i_0++, dstptr_0++) {
      *dstptr_0 = v_0;
   }
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(new_size_0 * 2, &new_ht_index_0, 0), _fx_cleanup);
   int_ tabsz_0 = 0;
   int_ v_1 = self_0->u.t.t2;
   for (int_ j_0 = 0; j_0 < v_1; j_0++) {
      FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
      if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, ht_table_0, j_0)->hv < 9223372036854775808ULL) {
         FX_CHKIDX(FX_CHKIDX1(ht_table_0, 0, j_0), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_2 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, ht_table_0, j_0);
         int_ v_3;
         FX_CALL(
            _fx_M3AstFM9add_fast_i4iA1iA1Rt24Hashset__hashset_entry_t1RM4id_tRt24Hashset__hashset_entry_t1RM4id_t(tabsz_0,
               &new_ht_index_0, &new_ht_table_0, &v_2, &v_3, 0), _fx_catch_0);
         tabsz_0 = v_3;
      }

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_arr_t* v_4 = &self_0->u.t.t4;
   FX_FREE_ARR(v_4);
   fx_copy_arr(&new_ht_index_0, v_4);
   fx_arr_t* v_5 = &self_0->u.t.t5;
   FX_FREE_ARR(v_5);
   fx_copy_arr(&new_ht_table_0, v_5);
   self_0->u.t.t2 = tabsz_0;
   self_0->u.t.t3 = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&ht_table_0);
   FX_FREE_ARR(&new_ht_table_0);
   FX_FREE_ARR(&new_ht_index_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9find_idx_Ta2i3Nt10Hashset__t1RM4id_tRM4id_tq(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   uint64_t hv_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_1 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_1; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_2 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_2), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry_0 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, v_2);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_3 = entry_0.key;
            bool __fold_result___0 = true;
            bool t_1;
            if (v_3.m == k_0->m) {
               t_1 = __fold_result___0;
            }
            else {
               t_1 = false;
            }
            __fold_result___0 = t_1;
            bool t_2;
            if (v_3.i == k_0->i) {
               t_2 = __fold_result___0;
            }
            else {
               t_2 = false;
            }
            __fold_result___0 = t_2;
            bool t_3;
            if (v_3.j == k_0->j) {
               t_3 = __fold_result___0;
            }
            else {
               t_3 = false;
            }
            __fold_result___0 = t_3;
            t_0 = __fold_result___0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         FX_BREAK(_fx_catch_0);
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i tup_0 = { j_0, found_0 };
   *fx_result = tup_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM4add_v3Nt10Hashset__t1RM4id_tRM4id_tq(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* self_0,
   struct _fx_R9Ast__id_t* k_0,
   uint64_t hv_0,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   fx_exn_t v_2 = {0};
   int fx_status = 0;
   fx_copy_arr(&self_0->u.t.t4, &v_0);
   int_ idxsz_0 = FX_ARR_SIZE(v_0, 0);
   if (self_0->u.t.t1 + 1 > idxsz_0 >> 1) {
      while (idxsz_0 < (self_0->u.t.t1 + 1) * 2) {
         idxsz_0 = idxsz_0 * 2;
      }
      FX_CALL(_fx_M3AstFM4growv2Nt10Hashset__t1RM4id_ti(self_0, fx_maxi(idxsz_0 / 2, self_0->u.t.t1 + 1), 0), _fx_cleanup);
   }
   uint64_t perturb_0 = hv_0;
   int_ found_0 = -1;
   int_ insert_idx_0 = -1;
   int_ j_0 = (int_)hv_0 & (idxsz_0 - 1);
   int_ v_3 = idxsz_0 + 14;
   for (int_ i_0 = 0; i_0 < v_3; i_0++) {
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_catch_0);
      int_ tidx_0 = *FX_PTR_1D(int_, self_0->u.t.t4, j_0);
      if (tidx_0 >= 2) {
         int_ v_4 = tidx_0 - 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, v_4), _fx_catch_0);
         _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry_0 =
            *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, v_4);
         bool t_0;
         if (entry_0.hv == hv_0) {
            _fx_R9Ast__id_t v_5 = entry_0.key;
            bool __fold_result___0 = true;
            bool t_1;
            if (v_5.m == k_0->m) {
               t_1 = __fold_result___0;
            }
            else {
               t_1 = false;
            }
            __fold_result___0 = t_1;
            bool t_2;
            if (v_5.i == k_0->i) {
               t_2 = __fold_result___0;
            }
            else {
               t_2 = false;
            }
            __fold_result___0 = t_2;
            bool t_3;
            if (v_5.j == k_0->j) {
               t_3 = __fold_result___0;
            }
            else {
               t_3 = false;
            }
            __fold_result___0 = t_3;
            t_0 = __fold_result___0;
         }
         else {
            t_0 = false;
         }
         if (t_0) {
            found_0 = tidx_0 - 2; FX_BREAK(_fx_catch_0);
         }
      }
      else if (tidx_0 == 0) {
         if (insert_idx_0 < 0) {
            insert_idx_0 = j_0;
         }
         FX_BREAK(_fx_catch_0);
      }
      else {
         bool t_4;
         if (tidx_0 == 1) {
            t_4 = insert_idx_0 < 0;
         }
         else {
            t_4 = false;
         }
         if (t_4) {
            insert_idx_0 = j_0;
         }
      }
      perturb_0 = perturb_0 >> 5;
      j_0 = (int_)((uint64_t)(j_0 * 5 + 1) + perturb_0) & (idxsz_0 - 1);

   _fx_catch_0: ;
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (found_0 >= 0) {
      bool t_5;
      if (insert_idx_0 >= 0) {
         t_5 = insert_idx_0 != j_0;
      }
      else {
         t_5 = false;
      }
      if (t_5) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, j_0), _fx_cleanup);
         *FX_PTR_1D(int_, self_0->u.t.t4, j_0) = 1;
      }
   }
   else if (insert_idx_0 >= 0) {
      found_0 = self_0->u.t.t3 - 1;
      if (found_0 >= 0) {
         FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
         self_0->u.t.t3 =
            (int_)
               (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, found_0)->hv & 9223372036854775807ULL);
      }
      else {
         found_0 = self_0->u.t.t2;
         self_0->u.t.t2 = self_0->u.t.t2 + 1;
         fx_copy_arr(&self_0->u.t.t5, &v_1);
         FX_CALL(_fx_F6assertv1B(found_0 < FX_ARR_SIZE(v_1, 0), 0), _fx_cleanup);
      }
      _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t v_6 = { hv_0, *k_0 };
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t5, 0, found_0), _fx_cleanup);
      *FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, self_0->u.t.t5, found_0) = v_6;
      FX_CHKIDX(FX_CHKIDX1(self_0->u.t.t4, 0, insert_idx_0), _fx_cleanup);
      *FX_PTR_1D(int_, self_0->u.t.t4, insert_idx_0) = found_0 + 2;
      self_0->u.t.t1 = self_0->u.t.t1 + 1;
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("cannot insert element (full Hashtable?!)");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_2), _fx_cleanup);
      FX_THROW(&v_2, true, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   fx_free_exn(&v_2);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM1tNt9Dynvec__t1S3iA1SS(
   int_ arg0,
   fx_arr_t* arg1,
   fx_str_t* arg2,
   struct _fx_Nt9Dynvec__t1S_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt9Dynvec__t1S);
   v->u.t.t0 = arg0;
   fx_copy_arr(arg1, &v->u.t.t1);
   fx_copy_str(arg2, &v->u.t.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM1tNt9Dynvec__t1N14Ast__id_info_t3iA1N14Ast__id_info_tN14Ast__id_info_t(
   int_ arg0,
   fx_arr_t* arg1,
   struct _fx_N14Ast__id_info_t* arg2,
   struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt9Dynvec__t1N14Ast__id_info_t);
   v->u.t.t0 = arg0;
   fx_copy_arr(arg1, &v->u.t.t1);
   _fx_copy_N14Ast__id_info_t(arg2, &v->u.t.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6createNt9Dynvec__t1S2iS(
   int_ n0_0,
   fx_str_t* v0_0,
   struct _fx_Nt9Dynvec__t1S_data_t** fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   int fx_status = 0;
   fx_str_t* dstptr_0 = 0;
   {
      const int_ shape_0[] = { n0_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &v_0), _fx_cleanup);
   }
   dstptr_0 = (fx_str_t*)v_0.data;
   for (int_ i_0 = 0; i_0 < n0_0; i_0++, dstptr_0++) {
      fx_copy_str(v0_0, dstptr_0);
   }
   FX_CALL(_fx_M3AstFM1tNt9Dynvec__t1S3iA1SS(n0_0, &v_0, v0_0, fx_result), _fx_cleanup);

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM4pushi2Nt9Dynvec__t1SS(
   struct _fx_Nt9Dynvec__t1S_data_t* v_0,
   fx_str_t* x_0,
   int_* fx_result,
   void* fx_fv)
{
   fx_arr_t v_1 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   int fx_status = 0;
   fx_copy_arr(&v_0->u.t.t1, &v_1);
   int_ sz_0 = FX_ARR_SIZE(v_1, 0);
   int_ n0_0 = v_0->u.t.t0;
   if (sz_0 <= n0_0) {
      int_ n1_0 = fx_maxi(n0_0, 128) * 2;
      fx_copy_arr(&v_0->u.t.t1, &old_data_0);
      fx_copy_str(&v_0->u.t.t2, &val0_0);
      fx_str_t* dstptr_0 = 0;
      {
         const int_ shape_0[] = { n1_0 };
         FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
            _fx_cleanup);
      }
      dstptr_0 = (fx_str_t*)new_data_0.data;
      for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
         fx_str_t t_0 = {0};
         if (i_0 < n0_0) {
            FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
         }
         else {
            fx_copy_str(&val0_0, &t_0);
         }
         fx_copy_str(&t_0, dstptr_0);

      _fx_catch_0: ;
         FX_FREE_STR(&t_0);
         FX_CHECK_EXN(_fx_cleanup);
      }
      fx_arr_t* v_2 = &v_0->u.t.t1;
      FX_FREE_ARR(v_2);
      fx_copy_arr(&new_data_0, v_2);
   }
   v_0->u.t.t0 = n0_0 + 1;
   FX_CHKIDX(FX_CHKIDX1(v_0->u.t.t1, 0, n0_0), _fx_cleanup);
   fx_str_t* v_3 = FX_PTR_1D(fx_str_t, v_0->u.t.t1, n0_0);
   FX_FREE_STR(v_3);
   fx_copy_str(x_0, v_3);
   *fx_result = n0_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_1);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM5emptyRt6Map__t2RM4id_tRM4id_t1FPi2RM4id_tRM4id_t(
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(_fx_g10Ast__Empty, cmp_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM5emptyRt6Map__t2RM4id_tLN16Ast__env_entry_t1FPi2RM4id_tRM4id_t(
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_make_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(_fx_g12Ast__Empty1_, cmp_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(
   struct _fx_N12Set__color_t* arg0,
   struct _fx_Nt11Set__tree_t1S_data_t* arg1,
   fx_str_t* arg2,
   struct _fx_Nt11Set__tree_t1S_data_t* arg3,
   struct _fx_Nt11Set__tree_t1S_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt11Set__tree_t1S);
   v->u.Node.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.Node.t1);
   fx_copy_str(arg2, &v->u.Node.t2);
   FX_COPY_PTR(arg3, &v->u.Node.t3);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5emptyRt6Set__t1RM4id_t1FPi2RM4id_tRM4id_t(
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Rt6Set__t1R9Ast__id_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_make_Rt6Set__t1R9Ast__id_t(_fx_g12Ast__Empty3_, 0, cmp_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12balance_leftNt11Set__tree_t1S3Nt11Set__tree_t1SSNt11Set__tree_t1S(
   struct _fx_Nt11Set__tree_t1S_data_t* l_0,
   fx_str_t* x_0,
   struct _fx_Nt11Set__tree_t1S_data_t* r_0,
   struct _fx_Nt11Set__tree_t1S_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((l_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_0 = &l_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Set__tree_t1S v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Set__tree_t1S v_1 = 0;
               _fx_Nt11Set__tree_t1S v_2 = 0;
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                     vcase_1->t1, &vcase_1->t2, vcase_1->t3, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                     vcase_0->t3, x_0, r_0, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, v_1,
                     &vcase_0->t2, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Set__tree_t1S(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Set__tree_t1S(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((l_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_2 = &l_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Set__tree_t1S v_3 = vcase_2->t3;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Set__tree_t1S v_4 = 0;
               _fx_Nt11Set__tree_t1S v_5 = 0;
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                     vcase_2->t1, &vcase_2->t2, vcase_3->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                     vcase_3->t3, x_0, r_0, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, v_4,
                     &vcase_3->t2, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Set__tree_t1S(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Set__tree_t1S(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black, l_0, x_0, r_0,
         fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13balance_rightNt11Set__tree_t1S3Nt11Set__tree_t1SSNt11Set__tree_t1S(
   struct _fx_Nt11Set__tree_t1S_data_t* l_0,
   fx_str_t* x_0,
   struct _fx_Nt11Set__tree_t1S_data_t* r_0,
   struct _fx_Nt11Set__tree_t1S_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((r_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_0 = &r_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Set__tree_t1S v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Set__tree_t1S v_1 = 0;
               _fx_Nt11Set__tree_t1S v_2 = 0;
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black, l_0,
                     x_0, vcase_1->t1, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                     vcase_1->t3, &vcase_0->t2, vcase_0->t3, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, v_1,
                     &vcase_1->t2, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Set__tree_t1S(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Set__tree_t1S(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((r_0 != 0) + 1 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_2 = &r_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Set__tree_t1S v_3 = vcase_2->t3;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Set__tree_t1S v_4 = 0;
               _fx_Nt11Set__tree_t1S v_5 = 0;
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black, l_0,
                     x_0, vcase_2->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                     vcase_3->t1, &vcase_3->t2, vcase_3->t3, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, v_4,
                     &vcase_2->t2, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Set__tree_t1S(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Set__tree_t1S(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black, l_0, x_0, r_0,
         fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12add_to_tree_T2Nt11Set__tree_t1Si3Nt11Set__tree_t1SSFPi2SS(
   struct _fx_Nt11Set__tree_t1S_data_t* t_0,
   fx_str_t* x_0,
   struct _fx_FPi2SS* cmp_0,
   struct _fx_T2Nt11Set__tree_t1Si* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = (t_0 != 0) + 1;
   if (tag_0 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_0 = &t_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_T2Nt11Set__tree_t1Si v_0 = {0};
         _fx_Nt11Set__tree_t1S l_0 = 0;
         _fx_Nt11Set__tree_t1S v_1 = 0;
         _fx_T2Nt11Set__tree_t1Si v_2 = {0};
         _fx_Nt11Set__tree_t1S r_0 = 0;
         _fx_Nt11Set__tree_t1S v_3 = 0;
         _fx_Nt11Set__tree_t1S r_1 = vcase_0->t3;
         fx_str_t* y_0 = &vcase_0->t2;
         _fx_Nt11Set__tree_t1S l_1 = vcase_0->t1;
         int_ c_0;
         FX_CALL(cmp_0->fp(x_0, y_0, &c_0, cmp_0->fcv), _fx_catch_0);
         if (c_0 < 0) {
            FX_CALL(_fx_M3AstFM12add_to_tree_T2Nt11Set__tree_t1Si3Nt11Set__tree_t1SSFPi2SS(l_1, x_0, cmp_0, &v_0, 0),
               _fx_catch_0);
            FX_COPY_PTR(v_0.t0, &l_0);
            int_ dsz_0 = v_0.t1;
            FX_CALL(
               _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, l_0, y_0,
                  r_1, &v_1), _fx_catch_0);
            _fx_make_T2Nt11Set__tree_t1Si(v_1, dsz_0, fx_result);
         }
         else if (c_0 > 0) {
            FX_CALL(_fx_M3AstFM12add_to_tree_T2Nt11Set__tree_t1Si3Nt11Set__tree_t1SSFPi2SS(r_1, x_0, cmp_0, &v_2, 0),
               _fx_catch_0);
            FX_COPY_PTR(v_2.t0, &r_0);
            int_ dsz_1 = v_2.t1;
            FX_CALL(
               _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, l_1, y_0,
                  r_0, &v_3), _fx_catch_0);
            _fx_make_T2Nt11Set__tree_t1Si(v_3, dsz_1, fx_result);
         }
         else {
            _fx_make_T2Nt11Set__tree_t1Si(t_0, 0, fx_result);
         }

      _fx_catch_0: ;
         if (v_3) {
            _fx_free_Nt11Set__tree_t1S(&v_3);
         }
         if (r_0) {
            _fx_free_Nt11Set__tree_t1S(&r_0);
         }
         _fx_free_T2Nt11Set__tree_t1Si(&v_2);
         if (v_1) {
            _fx_free_Nt11Set__tree_t1S(&v_1);
         }
         if (l_0) {
            _fx_free_Nt11Set__tree_t1S(&l_0);
         }
         _fx_free_T2Nt11Set__tree_t1Si(&v_0);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 2) {
      _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_1 = &t_0->u.Node;
      if (vcase_1->t0.tag == 2) {
         _fx_T2Nt11Set__tree_t1Si v_4 = {0};
         _fx_Nt11Set__tree_t1S l_2 = 0;
         _fx_Nt11Set__tree_t1S v_5 = 0;
         _fx_T2Nt11Set__tree_t1Si v_6 = {0};
         _fx_Nt11Set__tree_t1S r_2 = 0;
         _fx_Nt11Set__tree_t1S v_7 = 0;
         _fx_Nt11Set__tree_t1S r_3 = vcase_1->t3;
         fx_str_t* y_1 = &vcase_1->t2;
         _fx_Nt11Set__tree_t1S l_3 = vcase_1->t1;
         int_ c_1;
         FX_CALL(cmp_0->fp(x_0, y_1, &c_1, cmp_0->fcv), _fx_catch_1);
         if (c_1 < 0) {
            FX_CALL(_fx_M3AstFM12add_to_tree_T2Nt11Set__tree_t1Si3Nt11Set__tree_t1SSFPi2SS(l_3, x_0, cmp_0, &v_4, 0),
               _fx_catch_1);
            FX_COPY_PTR(v_4.t0, &l_2);
            int_ dsz_2 = v_4.t1;
            if (dsz_2 > 0) {
               FX_CALL(_fx_M3AstFM12balance_leftNt11Set__tree_t1S3Nt11Set__tree_t1SSNt11Set__tree_t1S(l_2, y_1, r_3, &v_5, 0),
                  _fx_catch_1);
            }
            else {
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black, l_2,
                     y_1, r_3, &v_5), _fx_catch_1);
            }
            _fx_make_T2Nt11Set__tree_t1Si(v_5, dsz_2, fx_result);
         }
         else if (c_1 > 0) {
            FX_CALL(_fx_M3AstFM12add_to_tree_T2Nt11Set__tree_t1Si3Nt11Set__tree_t1SSFPi2SS(r_3, x_0, cmp_0, &v_6, 0),
               _fx_catch_1);
            FX_COPY_PTR(v_6.t0, &r_2);
            int_ dsz_3 = v_6.t1;
            if (dsz_3 > 0) {
               FX_CALL(_fx_M3AstFM13balance_rightNt11Set__tree_t1S3Nt11Set__tree_t1SSNt11Set__tree_t1S(l_3, y_1, r_2, &v_7, 0),
                  _fx_catch_1);
            }
            else {
               FX_CALL(
                  _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black, l_3,
                     y_1, r_2, &v_7), _fx_catch_1);
            }
            _fx_make_T2Nt11Set__tree_t1Si(v_7, dsz_3, fx_result);
         }
         else {
            _fx_make_T2Nt11Set__tree_t1Si(t_0, 0, fx_result);
         }

      _fx_catch_1: ;
         if (v_7) {
            _fx_free_Nt11Set__tree_t1S(&v_7);
         }
         if (r_2) {
            _fx_free_Nt11Set__tree_t1S(&r_2);
         }
         _fx_free_T2Nt11Set__tree_t1Si(&v_6);
         if (v_5) {
            _fx_free_Nt11Set__tree_t1S(&v_5);
         }
         if (l_2) {
            _fx_free_Nt11Set__tree_t1S(&l_2);
         }
         _fx_free_T2Nt11Set__tree_t1Si(&v_4);
         goto _fx_endmatch_0;
      }
   }
   _fx_Nt11Set__tree_t1S v_8 = 0;
   FX_CALL(
      _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g8Ast__Red, _fx_g12Ast__Empty2_,
         x_0, _fx_g12Ast__Empty2_, &v_8), _fx_catch_2);
   _fx_make_T2Nt11Set__tree_t1Si(v_8, 1, fx_result);

_fx_catch_2: ;
   if (v_8) {
      _fx_free_Nt11Set__tree_t1S(&v_8);
   }

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM4app_v2Nt11Set__tree_t1RM4id_tFPv1RM4id_t(
   struct _fx_Nt11Set__tree_t1R9Ast__id_t_data_t* t_0,
   struct _fx_FPv1R9Ast__id_t* f_0,
   void* fx_fv)
{
   _fx_Nt11Set__tree_t1R9Ast__id_t t_1 = 0;
   _fx_FPv1R9Ast__id_t f_1 = {0};
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(t_0, &t_1);
   FX_COPY_FP(f_0, &f_1);
   for (;;) {
      _fx_Nt11Set__tree_t1R9Ast__id_t t_2 = 0;
      _fx_FPv1R9Ast__id_t f_2 = {0};
      FX_COPY_PTR(t_1, &t_2);
      FX_COPY_FP(&f_1, &f_2);
      if ((t_2 != 0) + 1 == 2) {
         _fx_T4N12Set__color_tNt11Set__tree_t1R9Ast__id_tR9Ast__id_tNt11Set__tree_t1R9Ast__id_t* vcase_0 = &t_2->u.Node;
         FX_CALL(_fx_M3AstFM4app_v2Nt11Set__tree_t1RM4id_tFPv1RM4id_t(vcase_0->t1, &f_2, 0), _fx_catch_0);
         FX_CALL(f_2.fp(&vcase_0->t2, f_2.fcv), _fx_catch_0);
         _fx_Nt11Set__tree_t1R9Ast__id_t* r_0 = &vcase_0->t3;
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
         FX_COPY_PTR(*r_0, &t_1);
         FX_FREE_FP(&f_1);
         FX_COPY_FP(&f_2, &f_1);

      _fx_catch_0: ;
      }
      else {
         FX_BREAK(_fx_catch_1);  _fx_catch_1: ;
      }
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_FP(&f_2);
      if (t_2) {
         _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   if (t_1) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&t_1);
   }
   FX_FREE_FP(&f_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8add_listRt6Set__t1S2Rt6Set__t1SLS(
   struct _fx_Rt6Set__t1S* s_0,
   struct _fx_LS_data_t* l_0,
   struct _fx_Rt6Set__t1S* fx_result,
   void* fx_fv)
{
   _fx_FPi2SS cmp_0 = {0};
   _fx_Nt11Set__tree_t1S v_0 = 0;
   _fx_T2Nt11Set__tree_t1Si __fold_result___0 = {0};
   _fx_T2Nt11Set__tree_t1Si v_1 = {0};
   _fx_Nt11Set__tree_t1S new_root_0 = 0;
   int fx_status = 0;
   FX_COPY_FP(&s_0->cmp, &cmp_0);
   FX_COPY_PTR(s_0->root, &v_0);
   _fx_make_T2Nt11Set__tree_t1Si(v_0, s_0->size, &__fold_result___0);
   _fx_LS lst_0 = l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_T2Nt11Set__tree_t1Si v_2 = {0};
      _fx_Nt11Set__tree_t1S new_root_1 = 0;
      _fx_T2Nt11Set__tree_t1Si v_3 = {0};
      _fx_Nt11Set__tree_t1S t_0 = 0;
      _fx_T2Nt11Set__tree_t1SB v_4 = {0};
      _fx_Nt11Set__tree_t1S t_1 = 0;
      _fx_T2Nt11Set__tree_t1Si v_5 = {0};
      fx_str_t* x_0 = &lst_0->hd;
      _fx_copy_T2Nt11Set__tree_t1Si(&__fold_result___0, &v_2);
      FX_COPY_PTR(v_2.t0, &new_root_1);
      FX_CALL(_fx_M3AstFM12add_to_tree_T2Nt11Set__tree_t1Si3Nt11Set__tree_t1SSFPi2SS(new_root_1, x_0, &cmp_0, &v_3, 0),
         _fx_catch_1);
      FX_COPY_PTR(v_3.t0, &t_0);
      int_ dsz_0 = v_3.t1;
      if ((t_0 != 0) + 1 == 2) {
         _fx_T4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S* vcase_0 = &t_0->u.Node;
         if (vcase_0->t0.tag == 1) {
            _fx_Nt11Set__tree_t1S v_6 = 0;
            FX_CALL(
               _fx_M3AstFM4NodeNt11Set__tree_t1S4N12Set__color_tNt11Set__tree_t1SSNt11Set__tree_t1S(&_fx_g10Ast__Black,
                  vcase_0->t1, &vcase_0->t2, vcase_0->t3, &v_6), _fx_catch_0);
            _fx_make_T2Nt11Set__tree_t1SB(v_6, false, &v_4);

         _fx_catch_0: ;
            if (v_6) {
               _fx_free_Nt11Set__tree_t1S(&v_6);
            }
            goto _fx_endmatch_0;
         }
      }
      _fx_make_T2Nt11Set__tree_t1SB(t_0, true, &v_4);

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_1);
      FX_COPY_PTR(v_4.t0, &t_1);
      _fx_make_T2Nt11Set__tree_t1Si(t_1, v_2.t1 + dsz_0, &v_5);
      _fx_free_T2Nt11Set__tree_t1Si(&__fold_result___0);
      _fx_copy_T2Nt11Set__tree_t1Si(&v_5, &__fold_result___0);

   _fx_catch_1: ;
      _fx_free_T2Nt11Set__tree_t1Si(&v_5);
      if (t_1) {
         _fx_free_Nt11Set__tree_t1S(&t_1);
      }
      _fx_free_T2Nt11Set__tree_t1SB(&v_4);
      if (t_0) {
         _fx_free_Nt11Set__tree_t1S(&t_0);
      }
      _fx_free_T2Nt11Set__tree_t1Si(&v_3);
      if (new_root_1) {
         _fx_free_Nt11Set__tree_t1S(&new_root_1);
      }
      _fx_free_T2Nt11Set__tree_t1Si(&v_2);
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_T2Nt11Set__tree_t1Si(&__fold_result___0, &v_1);
   FX_COPY_PTR(v_1.t0, &new_root_0);
   int_ size_0 = v_1.t1;
   _fx_make_Rt6Set__t1S(new_root_0, size_0, &cmp_0, fx_result);

_fx_cleanup: ;
   FX_FREE_FP(&cmp_0);
   if (v_0) {
      _fx_free_Nt11Set__tree_t1S(&v_0);
   }
   _fx_free_T2Nt11Set__tree_t1Si(&__fold_result___0);
   _fx_free_T2Nt11Set__tree_t1Si(&v_1);
   if (new_root_0) {
      _fx_free_Nt11Set__tree_t1S(&new_root_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9from_listRt6Set__t1S2FPi2SSLS(
   struct _fx_FPi2SS* cmp_0,
   struct _fx_LS_data_t* l_0,
   struct _fx_Rt6Set__t1S* fx_result,
   void* fx_fv)
{
   _fx_Rt6Set__t1S v_0 = {0};
   int fx_status = 0;
   _fx_make_Rt6Set__t1S(_fx_g12Ast__Empty2_, 0, cmp_0, &v_0);
   FX_CALL(_fx_M3AstFM8add_listRt6Set__t1S2Rt6Set__t1SLS(&v_0, l_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_Rt6Set__t1S(&v_0);
   return fx_status;
}

FX_EXTERN_C void _fx_M3AstFM7ScBlockN12Ast__scope_t1i(int_ arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 1;
   fx_result->u.ScBlock = arg0;
}

FX_EXTERN_C void _fx_M3AstFM6ScLoopN12Ast__scope_t2Bi(bool arg0, int_ arg1, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 2;
   fx_result->u.ScLoop.t0 = arg0;
   fx_result->u.ScLoop.t1 = arg1;
}

FX_EXTERN_C void _fx_M3AstFM6ScFoldN12Ast__scope_t1i(int_ arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 3;
   fx_result->u.ScFold = arg0;
}

FX_EXTERN_C void _fx_M3AstFM8ScArrMapN12Ast__scope_t1i(int_ arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 4;
   fx_result->u.ScArrMap = arg0;
}

FX_EXTERN_C void _fx_M3AstFM5ScMapN12Ast__scope_t1i(int_ arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 5;
   fx_result->u.ScMap = arg0;
}

FX_EXTERN_C void _fx_M3AstFM5ScTryN12Ast__scope_t1i(int_ arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 6;
   fx_result->u.ScTry = arg0;
}

FX_EXTERN_C void _fx_M3AstFM5ScFunN12Ast__scope_t1RM4id_t(struct _fx_R9Ast__id_t* arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 7;
   fx_result->u.ScFun = *arg0;
}

FX_EXTERN_C void _fx_M3AstFM11ScInterfaceN12Ast__scope_t1RM4id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 9;
   fx_result->u.ScInterface = *arg0;
}

FX_EXTERN_C void _fx_M3AstFM8ScModuleN12Ast__scope_t1i(int_ arg0, struct _fx_N12Ast__scope_t* fx_result)
{
   fx_result->tag = 10;
   fx_result->u.ScModule = arg0;
}

FX_EXTERN_C int _fx_M3AstFM17make_CompileErrorE2RM5loc_tS(struct _fx_R10Ast__loc_t* arg0, fx_str_t* arg1, fx_exn_t* fx_result)
{
   FX_MAKE_EXN_IMPL_START(_FX_EXN_E17Ast__CompileError, _fx_E17Ast__CompileError_data_t, _fx_E17Ast__CompileError_info);
   exn_data->data.t0 = *arg0;
   fx_copy_str(arg1, &exn_data->data.t1);
   return 0;
}

FX_EXTERN_C void _fx_M3AstFM6LitIntN10Ast__lit_t1l(int64_t arg0, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 1;
   fx_result->u.LitInt = arg0;
}

FX_EXTERN_C void _fx_M3AstFM7LitSIntN10Ast__lit_t2il(int_ arg0, int64_t arg1, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 2;
   fx_result->u.LitSInt.t0 = arg0;
   fx_result->u.LitSInt.t1 = arg1;
}

FX_EXTERN_C void _fx_M3AstFM7LitUIntN10Ast__lit_t2iq(int_ arg0, uint64_t arg1, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 3;
   fx_result->u.LitUInt.t0 = arg0;
   fx_result->u.LitUInt.t1 = arg1;
}

FX_EXTERN_C void _fx_M3AstFM8LitFloatN10Ast__lit_t2id(int_ arg0, double arg1, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 4;
   fx_result->u.LitFloat.t0 = arg0;
   fx_result->u.LitFloat.t1 = arg1;
}

FX_EXTERN_C void _fx_M3AstFM9LitStringN10Ast__lit_t1S(fx_str_t* arg0, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 5;
   fx_copy_str(arg0, &fx_result->u.LitString);
}

FX_EXTERN_C void _fx_M3AstFM7LitCharN10Ast__lit_t1C(char_ arg0, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 6;
   fx_result->u.LitChar = arg0;
}

FX_EXTERN_C void _fx_M3AstFM7LitBoolN10Ast__lit_t1B(bool arg0, struct _fx_N10Ast__lit_t* fx_result)
{
   fx_result->tag = 7;
   fx_result->u.LitBool = arg0;
}

FX_EXTERN_C int _fx_M3AstFM6TypVarN10Ast__typ_t1rNt6option1N10Ast__typ_t(
   struct _fx_rNt6option1N10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 1;
   FX_COPY_PTR(arg0, &v->u.TypVar);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11TypVarTupleN10Ast__typ_t1Nt6option1N10Ast__typ_t(
   struct _fx_Nt6option1N10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 2;
   FX_COPY_PTR(arg0, &v->u.TypVarTuple);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11TypVarArrayN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 3;
   FX_COPY_PTR(arg0, &v->u.TypVarArray);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7TypSIntN10Ast__typ_t1i(int_ arg0, struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 6;
   v->u.TypSInt = arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7TypUIntN10Ast__typ_t1i(int_ arg0, struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 7;
   v->u.TypUInt = arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8TypFloatN10Ast__typ_t1i(int_ arg0, struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 9;
   v->u.TypFloat = arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6TypFunN10Ast__typ_t2LN10Ast__typ_tN10Ast__typ_t(
   struct _fx_LN10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t* arg1,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 14;
   FX_COPY_PTR(arg0, &v->u.TypFun.t0);
   FX_COPY_PTR(arg1, &v->u.TypFun.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7TypListN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 15;
   FX_COPY_PTR(arg0, &v->u.TypList);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9TypVectorN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 16;
   FX_COPY_PTR(arg0, &v->u.TypVector);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8TypTupleN10Ast__typ_t1LN10Ast__typ_t(
   struct _fx_LN10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 17;
   FX_COPY_PTR(arg0, &v->u.TypTuple);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6TypRefN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 18;
   FX_COPY_PTR(arg0, &v->u.TypRef);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8TypArrayN10Ast__typ_t2iN10Ast__typ_t(
   int_ arg0,
   struct _fx_N10Ast__typ_t_data_t* arg1,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 19;
   v->u.TypArray.t0 = arg0;
   FX_COPY_PTR(arg1, &v->u.TypArray.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9TypRecordN10Ast__typ_t1rT2LT4RM11val_flags_tRM4id_tN10Ast__typ_tN10Ast__exp_tB(
   struct _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 20;
   FX_COPY_PTR(arg0, &v->u.TypRecord);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6TypAppN10Ast__typ_t2LN10Ast__typ_tRM4id_t(
   struct _fx_LN10Ast__typ_t_data_t* arg0,
   struct _fx_R9Ast__id_t* arg1,
   struct _fx_N10Ast__typ_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__typ_t);
   v->tag = 24;
   FX_COPY_PTR(arg0, &v->u.TypApp.t0);
   v->u.TypApp.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5OpCmpN13Ast__binary_t1N12Ast__cmpop_t(
   struct _fx_N12Ast__cmpop_t* arg0,
   struct _fx_N13Ast__binary_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N13Ast__binary_t);
   v->tag = 21;
   v->u.OpCmp = *arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8OpDotCmpN13Ast__binary_t1N12Ast__cmpop_t(
   struct _fx_N12Ast__cmpop_t* arg0,
   struct _fx_N13Ast__binary_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N13Ast__binary_t);
   v->tag = 22;
   v->u.OpDotCmp = *arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11OpAugBinaryN13Ast__binary_t1N13Ast__binary_t(
   struct _fx_N13Ast__binary_t_data_t* arg0,
   struct _fx_N13Ast__binary_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N13Ast__binary_t);
   v->tag = 27;
   FX_COPY_PTR(arg0, &v->u.OpAugBinary);
   return 0;
}

FX_EXTERN_C void _fx_M3AstFM10IntrinMathN13Ast__intrin_t1RM4id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N13Ast__intrin_t* fx_result)
{
   fx_result->tag = 16;
   fx_result->u.IntrinMath = *arg0;
}

FX_EXTERN_C void _fx_M3AstFM14IntrinSaturateN13Ast__intrin_t1N12Ast__sctyp_t(
   struct _fx_N12Ast__sctyp_t* arg0,
   struct _fx_N13Ast__intrin_t* fx_result)
{
   fx_result->tag = 17;
   fx_result->u.IntrinSaturate = *arg0;
}

FX_EXTERN_C void _fx_M3AstFM11CtorVariantN17Ast__fun_constr_t1i(int_ arg0, struct _fx_N17Ast__fun_constr_t* fx_result)
{
   fx_result->tag = 3;
   fx_result->u.CtorVariant = arg0;
}

FX_EXTERN_C void _fx_M3AstFM6CtorFPN17Ast__fun_constr_t1RM4id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N17Ast__fun_constr_t* fx_result)
{
   fx_result->tag = 4;
   fx_result->u.CtorFP = *arg0;
}

FX_EXTERN_C void _fx_M3AstFM7CtorExnN17Ast__fun_constr_t1RM4id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N17Ast__fun_constr_t* fx_result)
{
   fx_result->tag = 5;
   fx_result->u.CtorExn = *arg0;
}

FX_EXTERN_C int _fx_M3AstFM6ExpNopN10Ast__exp_t1RM5loc_t(
   struct _fx_R10Ast__loc_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 1;
   v->u.ExpNop = *arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpBreakN10Ast__exp_t2BRM5loc_t(
   bool arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 2;
   v->u.ExpBreak.t0 = arg0;
   v->u.ExpBreak.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11ExpContinueN10Ast__exp_t1RM5loc_t(
   struct _fx_R10Ast__loc_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 3;
   v->u.ExpContinue = *arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9ExpReturnN10Ast__exp_t2Nt6option1N10Ast__exp_tRM5loc_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 4;
   FX_COPY_PTR(arg0, &v->u.ExpReturn.t0);
   v->u.ExpReturn.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int
   _fx_M3AstFM8ExpRangeN10Ast__exp_t4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* arg0,
   struct _fx_Nt6option1N10Ast__exp_t_data_t* arg1,
   struct _fx_Nt6option1N10Ast__exp_t_data_t* arg2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg3,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 5;
   FX_COPY_PTR(arg0, &v->u.ExpRange.t0);
   FX_COPY_PTR(arg1, &v->u.ExpRange.t1);
   FX_COPY_PTR(arg2, &v->u.ExpRange.t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg3, &v->u.ExpRange.t3);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6ExpLitN10Ast__exp_t2N10Ast__lit_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__lit_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 6;
   _fx_copy_N10Ast__lit_t(arg0, &v->u.ExpLit.t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpLit.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpIdentN10Ast__exp_t2RM4id_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 7;
   v->u.ExpIdent.t0 = *arg0;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpIdent.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9ExpBinaryN10Ast__exp_t4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N13Ast__binary_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_N10Ast__exp_t_data_t* arg2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg3,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 8;
   FX_COPY_PTR(arg0, &v->u.ExpBinary.t0);
   FX_COPY_PTR(arg1, &v->u.ExpBinary.t1);
   FX_COPY_PTR(arg2, &v->u.ExpBinary.t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg3, &v->u.ExpBinary.t3);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpUnaryN10Ast__exp_t3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N12Ast__unary_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 9;
   v->u.ExpUnary.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.ExpUnary.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpUnary.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9ExpIntrinN10Ast__exp_t3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N13Ast__intrin_t* arg0,
   struct _fx_LN10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 10;
   v->u.ExpIntrin.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.ExpIntrin.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpIntrin.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7ExpSyncN10Ast__exp_t2RM4id_tN10Ast__exp_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 11;
   v->u.ExpSync.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.ExpSync.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6ExpSeqN10Ast__exp_t2LN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_LN10Ast__exp_t_data_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 12;
   FX_COPY_PTR(arg0, &v->u.ExpSeq.t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpSeq.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM10ExpMkTupleN10Ast__exp_t2LN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_LN10Ast__exp_t_data_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 13;
   FX_COPY_PTR(arg0, &v->u.ExpMkTuple.t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpMkTuple.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM10ExpMkArrayN10Ast__exp_t2LLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_LLN10Ast__exp_t_data_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 14;
   FX_COPY_PTR(arg0, &v->u.ExpMkArray.t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpMkArray.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11ExpMkVectorN10Ast__exp_t2LN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_LN10Ast__exp_t_data_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 15;
   FX_COPY_PTR(arg0, &v->u.ExpMkVector.t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpMkVector.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11ExpMkRecordN10Ast__exp_t3N10Ast__exp_tLT2RM4id_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 16;
   FX_COPY_PTR(arg0, &v->u.ExpMkRecord.t0);
   FX_COPY_PTR(arg1, &v->u.ExpMkRecord.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpMkRecord.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM15ExpUpdateRecordN10Ast__exp_t3N10Ast__exp_tLT2RM4id_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 17;
   FX_COPY_PTR(arg0, &v->u.ExpUpdateRecord.t0);
   FX_COPY_PTR(arg1, &v->u.ExpUpdateRecord.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpUpdateRecord.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7ExpCallN10Ast__exp_t3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_LN10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 18;
   FX_COPY_PTR(arg0, &v->u.ExpCall.t0);
   FX_COPY_PTR(arg1, &v->u.ExpCall.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpCall.t2);
   return 0;
}

FX_EXTERN_C int
   _fx_M3AstFM5ExpAtN10Ast__exp_t5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N13Ast__border_t* arg1,
   struct _fx_N18Ast__interpolate_t* arg2,
   struct _fx_LN10Ast__exp_t_data_t* arg3,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg4,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 19;
   FX_COPY_PTR(arg0, &v->u.ExpAt.t0);
   v->u.ExpAt.t1 = *arg1;
   v->u.ExpAt.t2 = *arg2;
   FX_COPY_PTR(arg3, &v->u.ExpAt.t3);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg4, &v->u.ExpAt.t4);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9ExpAssignN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 20;
   FX_COPY_PTR(arg0, &v->u.ExpAssign.t0);
   FX_COPY_PTR(arg1, &v->u.ExpAssign.t1);
   v->u.ExpAssign.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6ExpMemN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 21;
   FX_COPY_PTR(arg0, &v->u.ExpMem.t0);
   FX_COPY_PTR(arg1, &v->u.ExpMem.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpMem.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpThrowN10Ast__exp_t2N10Ast__exp_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 22;
   FX_COPY_PTR(arg0, &v->u.ExpThrow.t0);
   v->u.ExpThrow.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5ExpIfN10Ast__exp_t4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_N10Ast__exp_t_data_t* arg2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg3,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 23;
   FX_COPY_PTR(arg0, &v->u.ExpIf.t0);
   FX_COPY_PTR(arg1, &v->u.ExpIf.t1);
   FX_COPY_PTR(arg2, &v->u.ExpIf.t2);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg3, &v->u.ExpIf.t3);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpWhileN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 24;
   FX_COPY_PTR(arg0, &v->u.ExpWhile.t0);
   FX_COPY_PTR(arg1, &v->u.ExpWhile.t1);
   v->u.ExpWhile.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM10ExpDoWhileN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 25;
   FX_COPY_PTR(arg0, &v->u.ExpDoWhile.t0);
   FX_COPY_PTR(arg1, &v->u.ExpDoWhile.t1);
   v->u.ExpDoWhile.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6ExpForN10Ast__exp_t5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tRM11for_flags_tRM5loc_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__pat_t_data_t* arg1,
   struct _fx_N10Ast__exp_t_data_t* arg2,
   struct _fx_R16Ast__for_flags_t* arg3,
   struct _fx_R10Ast__loc_t* arg4,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 26;
   FX_COPY_PTR(arg0, &v->u.ExpFor.t0);
   FX_COPY_PTR(arg1, &v->u.ExpFor.t1);
   FX_COPY_PTR(arg2, &v->u.ExpFor.t2);
   v->u.ExpFor.t3 = *arg3;
   v->u.ExpFor.t4 = *arg4;
   return 0;
}

FX_EXTERN_C int
   _fx_M3AstFM6ExpMapN10Ast__exp_t4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tRM11for_flags_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_R16Ast__for_flags_t* arg2,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg3,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 27;
   FX_COPY_PTR(arg0, &v->u.ExpMap.t0);
   FX_COPY_PTR(arg1, &v->u.ExpMap.t1);
   v->u.ExpMap.t2 = *arg2;
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg3, &v->u.ExpMap.t3);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM11ExpTryCatchN10Ast__exp_t3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 28;
   FX_COPY_PTR(arg0, &v->u.ExpTryCatch.t0);
   FX_COPY_PTR(arg1, &v->u.ExpTryCatch.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpTryCatch.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpMatchN10Ast__exp_t3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 29;
   FX_COPY_PTR(arg0, &v->u.ExpMatch.t0);
   FX_COPY_PTR(arg1, &v->u.ExpMatch.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpMatch.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7ExpCastN10Ast__exp_t3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 30;
   FX_COPY_PTR(arg0, &v->u.ExpCast.t0);
   FX_COPY_PTR(arg1, &v->u.ExpCast.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpCast.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpTypedN10Ast__exp_t3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__exp_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 31;
   FX_COPY_PTR(arg0, &v->u.ExpTyped.t0);
   FX_COPY_PTR(arg1, &v->u.ExpTyped.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpTyped.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8ExpCCodeN10Ast__exp_t2ST2N10Ast__typ_tRM5loc_t(
   fx_str_t* arg0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 32;
   fx_copy_str(arg0, &v->u.ExpCCode.t0);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg1, &v->u.ExpCCode.t1);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7ExpDataN10Ast__exp_t3SST2N10Ast__typ_tRM5loc_t(
   fx_str_t* arg0,
   fx_str_t* arg1,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 33;
   fx_copy_str(arg0, &v->u.ExpData.t0);
   fx_copy_str(arg1, &v->u.ExpData.t1);
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(arg2, &v->u.ExpData.t2);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6DefValN10Ast__exp_t4N10Ast__pat_tN10Ast__exp_tRM11val_flags_tRM5loc_t(
   struct _fx_N10Ast__pat_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_R16Ast__val_flags_t* arg2,
   struct _fx_R10Ast__loc_t* arg3,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 34;
   FX_COPY_PTR(arg0, &v->u.DefVal.t0);
   FX_COPY_PTR(arg1, &v->u.DefVal.t1);
   _fx_copy_R16Ast__val_flags_t(arg2, &v->u.DefVal.t2);
   v->u.DefVal.t3 = *arg3;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6DefFunN10Ast__exp_t1rRM8deffun_t(
   struct _fx_rR13Ast__deffun_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 35;
   FX_COPY_PTR(arg0, &v->u.DefFun);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6DefExnN10Ast__exp_t1rRM8defexn_t(
   struct _fx_rR13Ast__defexn_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 36;
   FX_COPY_PTR(arg0, &v->u.DefExn);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6DefTypN10Ast__exp_t1rRM8deftyp_t(
   struct _fx_rR13Ast__deftyp_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 37;
   FX_COPY_PTR(arg0, &v->u.DefTyp);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM10DefVariantN10Ast__exp_t1rRM12defvariant_t(
   struct _fx_rR17Ast__defvariant_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 38;
   FX_COPY_PTR(arg0, &v->u.DefVariant);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM12DefInterfaceN10Ast__exp_t1rRM14definterface_t(
   struct _fx_rR19Ast__definterface_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 39;
   FX_COPY_PTR(arg0, &v->u.DefInterface);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9DirImportN10Ast__exp_t2LT2iRM4id_tRM5loc_t(
   struct _fx_LT2iR9Ast__id_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 40;
   FX_COPY_PTR(arg0, &v->u.DirImport.t0);
   v->u.DirImport.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM13DirImportFromN10Ast__exp_t3iLRM4id_tRM5loc_t(
   int_ arg0,
   struct _fx_LR9Ast__id_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 41;
   v->u.DirImportFrom.t0 = arg0;
   FX_COPY_PTR(arg1, &v->u.DirImportFrom.t1);
   v->u.DirImportFrom.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9DirPragmaN10Ast__exp_t2LSRM5loc_t(
   struct _fx_LS_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__exp_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__exp_t);
   v->tag = 42;
   FX_COPY_PTR(arg0, &v->u.DirPragma.t0);
   v->u.DirPragma.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6PatAnyN10Ast__pat_t1RM5loc_t(
   struct _fx_R10Ast__loc_t* arg0,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 1;
   v->u.PatAny = *arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6PatLitN10Ast__pat_t2N10Ast__lit_tRM5loc_t(
   struct _fx_N10Ast__lit_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 2;
   _fx_copy_N10Ast__lit_t(arg0, &v->u.PatLit.t0);
   v->u.PatLit.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8PatIdentN10Ast__pat_t2RM4id_tRM5loc_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 3;
   v->u.PatIdent.t0 = *arg0;
   v->u.PatIdent.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8PatTupleN10Ast__pat_t2LN10Ast__pat_tRM5loc_t(
   struct _fx_LN10Ast__pat_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 4;
   FX_COPY_PTR(arg0, &v->u.PatTuple.t0);
   v->u.PatTuple.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM10PatVariantN10Ast__pat_t3RM4id_tLN10Ast__pat_tRM5loc_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_LN10Ast__pat_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 5;
   v->u.PatVariant.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.PatVariant.t1);
   v->u.PatVariant.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM9PatRecordN10Ast__pat_t3Nt6option1RM4id_tLT2RM4id_tN10Ast__pat_tRM5loc_t(
   struct _fx_Nt6option1R9Ast__id_t* arg0,
   struct _fx_LT2R9Ast__id_tN10Ast__pat_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 6;
   v->u.PatRecord.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.PatRecord.t1);
   v->u.PatRecord.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7PatConsN10Ast__pat_t3N10Ast__pat_tN10Ast__pat_tRM5loc_t(
   struct _fx_N10Ast__pat_t_data_t* arg0,
   struct _fx_N10Ast__pat_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 7;
   FX_COPY_PTR(arg0, &v->u.PatCons.t0);
   FX_COPY_PTR(arg1, &v->u.PatCons.t1);
   v->u.PatCons.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5PatAsN10Ast__pat_t3N10Ast__pat_tRM4id_tRM5loc_t(
   struct _fx_N10Ast__pat_t_data_t* arg0,
   struct _fx_R9Ast__id_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 8;
   FX_COPY_PTR(arg0, &v->u.PatAs.t0);
   v->u.PatAs.t1 = *arg1;
   v->u.PatAs.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM8PatTypedN10Ast__pat_t3N10Ast__pat_tN10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__pat_t_data_t* arg0,
   struct _fx_N10Ast__typ_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 9;
   FX_COPY_PTR(arg0, &v->u.PatTyped.t0);
   FX_COPY_PTR(arg1, &v->u.PatTyped.t1);
   v->u.PatTyped.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM7PatWhenN10Ast__pat_t3N10Ast__pat_tN10Ast__exp_tRM5loc_t(
   struct _fx_N10Ast__pat_t_data_t* arg0,
   struct _fx_N10Ast__exp_t_data_t* arg1,
   struct _fx_R10Ast__loc_t* arg2,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 10;
   FX_COPY_PTR(arg0, &v->u.PatWhen.t0);
   FX_COPY_PTR(arg1, &v->u.PatWhen.t1);
   v->u.PatWhen.t2 = *arg2;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6PatAltN10Ast__pat_t2LN10Ast__pat_tRM5loc_t(
   struct _fx_LN10Ast__pat_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 11;
   FX_COPY_PTR(arg0, &v->u.PatAlt.t0);
   v->u.PatAlt.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6PatRefN10Ast__pat_t2N10Ast__pat_tRM5loc_t(
   struct _fx_N10Ast__pat_t_data_t* arg0,
   struct _fx_R10Ast__loc_t* arg1,
   struct _fx_N10Ast__pat_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N10Ast__pat_t);
   v->tag = 12;
   FX_COPY_PTR(arg0, &v->u.PatRef.t0);
   v->u.PatRef.t1 = *arg1;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM5EnvIdN16Ast__env_entry_t1RM4id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N16Ast__env_entry_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N16Ast__env_entry_t);
   v->tag = 1;
   v->u.EnvId = *arg0;
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6EnvTypN16Ast__env_entry_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* arg0,
   struct _fx_N16Ast__env_entry_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N16Ast__env_entry_t);
   v->tag = 2;
   FX_COPY_PTR(arg0, &v->u.EnvTyp);
   return 0;
}

FX_EXTERN_C void _fx_M3AstFM6IdDValN14Ast__id_info_t1RM8defval_t(
   struct _fx_R13Ast__defval_t* arg0,
   struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 2;
   _fx_copy_R13Ast__defval_t(arg0, &fx_result->u.IdDVal);
}

FX_EXTERN_C void _fx_M3AstFM5IdFunN14Ast__id_info_t1rRM8deffun_t(
   struct _fx_rR13Ast__deffun_t_data_t* arg0,
   struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 3;
   FX_COPY_PTR(arg0, &fx_result->u.IdFun);
}

FX_EXTERN_C void _fx_M3AstFM5IdExnN14Ast__id_info_t1rRM8defexn_t(
   struct _fx_rR13Ast__defexn_t_data_t* arg0,
   struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 4;
   FX_COPY_PTR(arg0, &fx_result->u.IdExn);
}

FX_EXTERN_C void _fx_M3AstFM5IdTypN14Ast__id_info_t1rRM8deftyp_t(
   struct _fx_rR13Ast__deftyp_t_data_t* arg0,
   struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 5;
   FX_COPY_PTR(arg0, &fx_result->u.IdTyp);
}

FX_EXTERN_C void _fx_M3AstFM9IdVariantN14Ast__id_info_t1rRM12defvariant_t(
   struct _fx_rR17Ast__defvariant_t_data_t* arg0,
   struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 6;
   FX_COPY_PTR(arg0, &fx_result->u.IdVariant);
}

FX_EXTERN_C void _fx_M3AstFM11IdInterfaceN14Ast__id_info_t1rRM14definterface_t(
   struct _fx_rR19Ast__definterface_t_data_t* arg0,
   struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 7;
   FX_COPY_PTR(arg0, &fx_result->u.IdInterface);
}

FX_EXTERN_C void _fx_M3AstFM8IdModuleN14Ast__id_info_t1i(int_ arg0, struct _fx_N14Ast__id_info_t* fx_result)
{
   fx_result->tag = 8;
   fx_result->u.IdModule = arg0;
}

FX_EXTERN_C int
   _fx_M3AstFM11defmodule_tN16Ast__defmodule_t10RM4id_tSiBLN10Ast__exp_tLiRt6Map__t2RM4id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
   struct _fx_R9Ast__id_t* arg0,
   fx_str_t* arg1,
   int_ arg2,
   bool arg3,
   struct _fx_LN10Ast__exp_t_data_t* arg4,
   struct _fx_Li_data_t* arg5,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* arg6,
   bool arg7,
   int_ arg8,
   struct _fx_Nt9Dynvec__t1N14Ast__id_info_t_data_t* arg9,
   struct _fx_N16Ast__defmodule_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_N16Ast__defmodule_t);
   v->u.defmodule_t.t0 = *arg0;
   fx_copy_str(arg1, &v->u.defmodule_t.t1);
   v->u.defmodule_t.t2 = arg2;
   v->u.defmodule_t.t3 = arg3;
   FX_COPY_PTR(arg4, &v->u.defmodule_t.t4);
   FX_COPY_PTR(arg5, &v->u.defmodule_t.t5);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(arg6, &v->u.defmodule_t.t6);
   v->u.defmodule_t.t7 = arg7;
   v->u.defmodule_t.t8 = arg8;
   FX_COPY_PTR(arg9, &v->u.defmodule_t.t9);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t(
   struct _fx_R9Ast__id_t* a_0,
   struct _fx_R9Ast__id_t* b_0,
   int_* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int_ dm_0;
   FX_CALL(_fx_F7__cmp__i2ii(a_0->m, b_0->m, &dm_0, 0), _fx_cleanup);
   if (dm_0 != 0) {
      *fx_result = dm_0;
   }
   else {
      int_ di_0;
      FX_CALL(_fx_F7__cmp__i2ii(a_0->i, b_0->i, &di_0, 0), _fx_cleanup);
      if (di_0 != 0) {
         *fx_result = di_0;
      }
      else {
         FX_CALL(_fx_F7__cmp__i2ii(a_0->j, b_0->j, fx_result, 0), _fx_cleanup);
      }
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(
   fx_str_t* name_0,
   struct _fx_T2LSi* bn_0,
   struct _fx_T2R9Ast__id_tT2LSi* fx_result,
   void* fx_fv)
{
   _fx_LS v_0 = 0;
   _fx_T2LSi v_1 = {0};
   int fx_status = 0;
   _fx_R9Ast__id_t v_2 = { 0, bn_0->t1, 0 };
   FX_COPY_PTR(bn_0->t0, &v_0);
   FX_CALL(_fx_cons_LS(name_0, v_0, false, &v_0), _fx_cleanup);
   _fx_make_T2LSi(v_0, bn_0->t1 + 1, &v_1);
   _fx_make_T2R9Ast__id_tT2LSi(&v_2, &v_1, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_LS(&v_0);
   }
   _fx_free_T2LSi(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6__eq__B2RM4id_tRM4id_t(
   struct _fx_R9Ast__id_t* a_0,
   struct _fx_R9Ast__id_t* b_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((bool)((a_0->m == b_0->m) & (a_0->i == b_0->i))) {
      *fx_result = (bool)((a_0->m == 0) | (a_0->j == b_0->j));
   }
   else {
      *fx_result = false;
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11loclist2locRM5loc_t2LRM5loc_tRM5loc_t(
   struct _fx_LR10Ast__loc_t_data_t* llist_0,
   struct _fx_R10Ast__loc_t* default_loc_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_R10Ast__loc_t __fold_result___0 = *default_loc_0;
   _fx_LR10Ast__loc_t lst_0 = llist_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_R10Ast__loc_t* loci_0 = &lst_0->hd;
      _fx_R10Ast__loc_t loc_0 = __fold_result___0;
      int_ col1_0 = loc_0.col1;
      int_ line1_0 = loc_0.line1;
      int_ col0_0 = loc_0.col0;
      int_ line0_0 = loc_0.line0;
      int_ m_idx_0 = loc_0.m_idx;
      int_ loci_col1_0 = loci_0->col1;
      int_ loci_line1_0 = loci_0->line1;
      int_ loci_col0_0 = loci_0->col0;
      int_ loci_line0_0 = loci_0->line0;
      int_ loci_m_idx_0 = loci_0->m_idx;
      _fx_R10Ast__loc_t v_0;
      if (m_idx_0 != loci_m_idx_0) {
         if (m_idx_0 <= 0) {
            v_0 = *loci_0;
         }
         else {
            v_0 = loc_0;
         }
      }
      else {
         _fx_R10Ast__loc_t rec_0 =
            { m_idx_0, fx_mini(line0_0, loci_line0_0), fx_mini(col0_0, loci_col0_0), fx_maxi(line1_0, loci_line1_0),
               fx_maxi(col1_0, loci_col1_0) };
         v_0 = rec_0;
      }
      __fold_result___0 = v_0;
   }
   *fx_result = __fold_result___0;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13get_start_locRM5loc_t1RM5loc_t(
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int_ col0_0 = loc_0->col0;
   int_ line0_0 = loc_0->line0;
   int_ m_idx_0 = loc_0->m_idx;
   _fx_R10Ast__loc_t rec_0 = { m_idx_0, line0_0, col0_0, line0_0, col0_0 };
   *fx_result = rec_0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_end_locRM5loc_t1RM5loc_t(
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int_ col1_0 = loc_0->col1;
   int_ line1_0 = loc_0->line1;
   int_ m_idx_0 = loc_0->m_idx;
   _fx_R10Ast__loc_t rec_0 = { m_idx_0, line1_0, col1_0, line1_0, col1_0 };
   *fx_result = rec_0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12make_new_typN10Ast__typ_t0(struct _fx_N10Ast__typ_t_data_t** fx_result, void* fx_fv)
{
   _fx_rNt6option1N10Ast__typ_t v_0 = 0;
   int fx_status = 0;
   FX_CALL(_fx_make_rNt6option1N10Ast__typ_t(_fx_g11Ast__None4_, &v_0), _fx_cleanup);
   FX_CALL(_fx_M3AstFM6TypVarN10Ast__typ_t1rNt6option1N10Ast__typ_t(v_0, fx_result), _fx_cleanup);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_rNt6option1N10Ast__typ_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12make_new_ctxT2N10Ast__typ_tRM5loc_t1RM5loc_t(
   struct _fx_R10Ast__loc_t* l_0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* fx_result,
   void* fx_fv)
{
   _fx_rNt6option1N10Ast__typ_t v_0 = 0;
   _fx_N10Ast__typ_t v_1 = 0;
   int fx_status = 0;
   FX_CALL(_fx_make_rNt6option1N10Ast__typ_t(_fx_g11Ast__None4_, &v_0), _fx_cleanup);
   FX_CALL(_fx_M3AstFM6TypVarN10Ast__typ_t1rNt6option1N10Ast__typ_t(v_0, &v_1), _fx_cleanup);
   _fx_make_T2N10Ast__typ_tR10Ast__loc_t(v_1, l_0, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_rNt6option1N10Ast__typ_t(&v_0);
   }
   if (v_1) {
      _fx_free_N10Ast__typ_t(&v_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17default_val_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   _fx_T2R9Ast__id_ti v_0 = { _fx_g9Ast__noid, -1 };
   _fx_make_R16Ast__val_flags_t(false, false, false, false, false, false, false, &v_0, 0, 0, fx_result);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17default_arg_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv)
{
   _fx_R16Ast__val_flags_t v_0 = {0};
   int fx_status = 0;
   _fx_T2R9Ast__id_ti v_1 = { _fx_g9Ast__noid, -1 };
   _fx_make_R16Ast__val_flags_t(false, false, false, false, false, false, false, &v_1, 0, 0, &v_0);
   _fx_make_R16Ast__val_flags_t(true, v_0.val_flag_mutable, v_0.val_flag_temp, v_0.val_flag_tempref, v_0.val_flag_private,
      v_0.val_flag_subarray, v_0.val_flag_instance, &v_0.val_flag_method, v_0.val_flag_ctor, v_0.val_flag_global, fx_result);
   _fx_free_R16Ast__val_flags_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17default_var_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv)
{
   _fx_R16Ast__val_flags_t v_0 = {0};
   int fx_status = 0;
   _fx_T2R9Ast__id_ti v_1 = { _fx_g9Ast__noid, -1 };
   _fx_make_R16Ast__val_flags_t(false, false, false, false, false, false, false, &v_1, 0, 0, &v_0);
   _fx_make_R16Ast__val_flags_t(v_0.val_flag_arg, true, v_0.val_flag_temp, v_0.val_flag_tempref, v_0.val_flag_private,
      v_0.val_flag_subarray, v_0.val_flag_instance, &v_0.val_flag_method, v_0.val_flag_ctor, v_0.val_flag_global, fx_result);
   _fx_free_R16Ast__val_flags_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM21default_tempval_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv)
{
   _fx_R16Ast__val_flags_t v_0 = {0};
   int fx_status = 0;
   _fx_T2R9Ast__id_ti v_1 = { _fx_g9Ast__noid, -1 };
   _fx_make_R16Ast__val_flags_t(false, false, false, false, false, false, false, &v_1, 0, 0, &v_0);
   _fx_make_R16Ast__val_flags_t(v_0.val_flag_arg, v_0.val_flag_mutable, true, v_0.val_flag_tempref, v_0.val_flag_private,
      v_0.val_flag_subarray, v_0.val_flag_instance, &v_0.val_flag_method, v_0.val_flag_ctor, v_0.val_flag_global, fx_result);
   _fx_free_R16Ast__val_flags_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM21default_tempref_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv)
{
   _fx_R16Ast__val_flags_t v_0 = {0};
   int fx_status = 0;
   _fx_T2R9Ast__id_ti v_1 = { _fx_g9Ast__noid, -1 };
   _fx_make_R16Ast__val_flags_t(false, false, false, false, false, false, false, &v_1, 0, 0, &v_0);
   _fx_make_R16Ast__val_flags_t(v_0.val_flag_arg, v_0.val_flag_mutable, v_0.val_flag_temp, true, v_0.val_flag_private,
      v_0.val_flag_subarray, v_0.val_flag_instance, &v_0.val_flag_method, v_0.val_flag_ctor, v_0.val_flag_global, fx_result);
   _fx_free_R16Ast__val_flags_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM21default_tempvar_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv)
{
   _fx_R16Ast__val_flags_t v_0 = {0};
   _fx_R16Ast__val_flags_t v_1 = {0};
   int fx_status = 0;
   _fx_T2R9Ast__id_ti v_2 = { _fx_g9Ast__noid, -1 };
   _fx_make_R16Ast__val_flags_t(false, false, false, false, false, false, false, &v_2, 0, 0, &v_0);
   _fx_make_R16Ast__val_flags_t(v_0.val_flag_arg, v_0.val_flag_mutable, true, v_0.val_flag_tempref, v_0.val_flag_private,
      v_0.val_flag_subarray, v_0.val_flag_instance, &v_0.val_flag_method, v_0.val_flag_ctor, v_0.val_flag_global, &v_1);
   _fx_make_R16Ast__val_flags_t(v_1.val_flag_arg, true, v_1.val_flag_temp, v_1.val_flag_tempref, v_1.val_flag_private,
      v_1.val_flag_subarray, v_1.val_flag_instance, &v_1.val_flag_method, v_1.val_flag_ctor, v_1.val_flag_global, fx_result);
   _fx_free_R16Ast__val_flags_t(&v_0);
   _fx_free_R16Ast__val_flags_t(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17default_fun_flagsRM11fun_flags_t0(struct _fx_R16Ast__fun_flags_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   _fx_R16Ast__fun_flags_t rec_0 =
      { -1, false, false, false, false, false, false, _fx_g13Ast__CtorNone, _fx_g9Ast__noid, false, false, false };
   *fx_result = rec_0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17default_for_flagsRM11for_flags_t0(struct _fx_R16Ast__for_flags_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   _fx_R16Ast__for_flags_t rec_0 = { false, _fx_g16Ast__ForMakeNone, false, false, false };
   *fx_result = rec_0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM21default_variant_flagsRM11var_flags_t0(struct _fx_R16Ast__var_flags_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   _fx_R16Ast__var_flags_t rec_0 = { 0, false, false, true, false, false, false };
   *fx_result = rec_0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16empty_id_hashsetNt10Hashset__t1RM4id_t1i(
   int_ size0_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   int fx_status = 0;
   int_ size_0 = 8;
   while (size_0 < size0_0) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry0_0 = { 0ULL, _fx_g9Ast__noid };
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      *dstptr_0 = entry0_0;
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashset__t1RM4id_t6Rt24Hashset__hashset_entry_t1RM4id_tiiiA1iA1Rt24Hashset__hashset_entry_t1RM4id_t(
         &entry0_0, 0, 0, 0, &v_0, &v_1, fx_result), _fx_cleanup);

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17empty_str_hashsetNt10Hashset__t1S1i(
   int_ size0_0,
   struct _fx_Nt10Hashset__t1S_data_t** fx_result,
   void* fx_fv)
{
   _fx_Rt24Hashset__hashset_entry_t1S entry0_0 = {0};
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   int fx_status = 0;
   int_ size_0 = 8;
   while (size_0 < size0_0) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   fx_str_t slit_0 = FX_MAKE_STR("");
   _fx_make_Rt24Hashset__hashset_entry_t1S(0ULL, &slit_0, &entry0_0);
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1S* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(
         fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1S), (fx_free_t)_fx_free_Rt24Hashset__hashset_entry_t1S,
            (fx_copy_t)_fx_copy_Rt24Hashset__hashset_entry_t1S, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1S*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      _fx_copy_Rt24Hashset__hashset_entry_t1S(&entry0_0, dstptr_0);
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashset__t1S6Rt24Hashset__hashset_entry_t1SiiiA1iA1Rt24Hashset__hashset_entry_t1S(&entry0_0, 0, 0, 0,
         &v_0, &v_1, fx_result), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_Rt24Hashset__hashset_entry_t1S(&entry0_0);
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10id_hashsetNt10Hashset__t1RM4id_t1Rt6Set__t1RM4id_t(
   struct _fx_Rt6Set__t1R9Ast__id_t* s_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t hs_0 = 0;
   _fx_FPv1R9Ast__id_t __lambda___0 = {0};
   _fx_Nt11Set__tree_t1R9Ast__id_t v_2 = 0;
   int fx_status = 0;
   int_ size_0 = 8;
   while (size_0 < s_0->size * 2) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry0_0 = { 0ULL, _fx_g9Ast__noid };
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      *dstptr_0 = entry0_0;
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashset__t1RM4id_t6Rt24Hashset__hashset_entry_t1RM4id_tiiiA1iA1Rt24Hashset__hashset_entry_t1RM4id_t(
         &entry0_0, 0, 0, 0, &v_0, &v_1, &hs_0), _fx_cleanup);
   _fx_M3AstFM7make_fpFPv1RM4id_t1Nt10Hashset__t1RM4id_t(hs_0, &__lambda___0);
   FX_COPY_PTR(s_0->root, &v_2);
   FX_CALL(_fx_M3AstFM4app_v2Nt11Set__tree_t1RM4id_tFPv1RM4id_t(v_2, &__lambda___0, 0), _fx_cleanup);
   FX_COPY_PTR(hs_0, fx_result);

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   if (hs_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&hs_0);
   }
   FX_FREE_FP(&__lambda___0);
   if (v_2) {
      _fx_free_Nt11Set__tree_t1R9Ast__id_t(&v_2);
   }
   return fx_status;
}

static int _fx_M3AstFM10__lambda__v1RM4id_t(struct _fx_R9Ast__id_t* x_0, void* fx_fv)
{
   int fx_status = 0;
   _fx_M3AstFM10__lambda__v1RM4id_t_cldata_t* cv_0 = (_fx_M3AstFM10__lambda__v1RM4id_t_cldata_t*)fx_fv;
   uint64_t __fold_result___0 = 14695981039346656037ULL;
   uint64_t h_0 = __fold_result___0 ^ ((uint64_t)x_0->m ^ 14695981039346656037ULL);
   __fold_result___0 = h_0 * 1099511628211ULL;
   uint64_t h_1 = __fold_result___0 ^ ((uint64_t)x_0->i ^ 14695981039346656037ULL);
   __fold_result___0 = h_1 * 1099511628211ULL;
   uint64_t h_2 = __fold_result___0 ^ ((uint64_t)x_0->j ^ 14695981039346656037ULL);
   __fold_result___0 = h_2 * 1099511628211ULL;
   FX_CALL(_fx_M3AstFM4add_v3Nt10Hashset__t1RM4id_tRM4id_tq(cv_0->t0, x_0, __fold_result___0 & 9223372036854775807ULL, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7make_fpFPv1RM4id_t1Nt10Hashset__t1RM4id_t(
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* arg0,
   struct _fx_FPv1R9Ast__id_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M3AstFM10__lambda__v1RM4id_t_cldata_t, _fx_free_M3AstFM10__lambda__v1RM4id_t,
      _fx_M3AstFM10__lambda__v1RM4id_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1RM5loc_t(struct _fx_R10Ast__loc_t* loc_0, fx_str_t* fx_result, void* fx_fv)
{
   fx_str_t fname_0 = {0};
   fx_str_t v_0 = {0};
   fx_str_t v_1 = {0};
   int fx_status = 0;
   if (loc_0->m_idx >= 0) {
      int_ v_2 = loc_0->m_idx;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_2), _fx_cleanup);
      fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_2))->u.defmodule_t.t1, &fname_0);
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
   }
   FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_0, 0), _fx_cleanup);
   FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_1, 0), _fx_cleanup);
   fx_str_t slit_1 = FX_MAKE_STR(":");
   fx_str_t slit_2 = FX_MAKE_STR(":");
   {
      const fx_str_t strs_0[] = { fname_0, slit_1, v_0, slit_2, v_1 };
      FX_CALL(fx_strjoin(0, 0, 0, strs_0, 5, fx_result), _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_0);
   FX_FREE_STR(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10new_id_idxi1i(int_ midx_0, int_* fx_result, void* fx_fv)
{
   fx_exn_t v_0 = {0};
   _fx_Nt9Dynvec__t1N14Ast__id_info_t v_1 = 0;
   fx_arr_t v_2 = {0};
   fx_arr_t old_data_0 = {0};
   _fx_N14Ast__id_info_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   int fx_status = 0;
   if (_fx_g15Ast__freeze_ids) {
      fx_str_t slit_0 = FX_MAKE_STR("internal error: attempt to add new AST id during K-phase or C code generation phase");
      FX_CALL(_fx_F9make_FailE1S(&slit_0, &v_0), _fx_cleanup);
      FX_THROW(&v_0, true, _fx_cleanup);
   }
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, midx_0), _fx_cleanup);
   FX_COPY_PTR((*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, midx_0))->u.defmodule_t.t9, &v_1);
   fx_copy_arr(&v_1->u.t.t1, &v_2);
   int_ sz_0 = FX_ARR_SIZE(v_2, 0);
   int_ n0_0 = v_1->u.t.t0;
   if (sz_0 <= n0_0) {
      int_ n1_0 = fx_maxi(n0_0, 128) * 2;
      fx_copy_arr(&v_1->u.t.t1, &old_data_0);
      _fx_copy_N14Ast__id_info_t(&v_1->u.t.t2, &val0_0);
      _fx_N14Ast__id_info_t* dstptr_0 = 0;
      {
         const int_ shape_0[] = { n1_0 };
         FX_CALL(
            fx_make_arr(1, shape_0, sizeof(_fx_N14Ast__id_info_t), (fx_free_t)_fx_free_N14Ast__id_info_t,
               (fx_copy_t)_fx_copy_N14Ast__id_info_t, 0, &new_data_0), _fx_cleanup);
      }
      dstptr_0 = (_fx_N14Ast__id_info_t*)new_data_0.data;
      for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
         _fx_N14Ast__id_info_t t_0 = {0};
         if (i_0 < n0_0) {
            FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0);
            _fx_copy_N14Ast__id_info_t(FX_PTR_1D(_fx_N14Ast__id_info_t, old_data_0, i_0), &t_0);
         }
         else {
            _fx_copy_N14Ast__id_info_t(&val0_0, &t_0);
         }
         _fx_copy_N14Ast__id_info_t(&t_0, dstptr_0);

      _fx_catch_0: ;
         _fx_free_N14Ast__id_info_t(&t_0);
         FX_CHECK_EXN(_fx_cleanup);
      }
      fx_arr_t* v_3 = &v_1->u.t.t1;
      FX_FREE_ARR(v_3);
      fx_copy_arr(&new_data_0, v_3);
   }
   v_1->u.t.t0 = n0_0 + 1;
   *fx_result = n0_0;

_fx_cleanup: ;
   fx_free_exn(&v_0);
   if (v_1) {
      _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(&v_1);
   }
   FX_FREE_ARR(&v_2);
   FX_FREE_ARR(&old_data_0);
   _fx_free_N14Ast__id_info_t(&val0_0);
   FX_FREE_ARR(&new_data_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7id2str_S2RM4id_tB(struct _fx_R9Ast__id_t* i_0, bool pp_0, fx_str_t* fx_result, void* fx_fv)
{
   fx_str_t prefix_0 = {0};
   fx_str_t v_0 = {0};
   int fx_status = 0;
   bool t_0;
   if ((bool)((i_0->m == _fx_g9Ast__noid.m) & (i_0->i == _fx_g9Ast__noid.i))) {
      t_0 = (bool)((i_0->m == 0) | (i_0->j == _fx_g9Ast__noid.j));
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, fx_result);
   }
   else {
      int_ v_1 = i_0->i;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_1), _fx_cleanup);
      fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_1), &prefix_0);
      bool t_1;
      if (pp_0) {
         t_1 = true;
      }
      else {
         t_1 = i_0->m == 0;
      }
      if (t_1) {
         fx_copy_str(&prefix_0, fx_result);
      }
      else {
         FX_CALL(_fx_F6stringS1i(i_0->j, &v_0, 0), _fx_cleanup);
         fx_str_t slit_1 = FX_MAKE_STR("@");
         {
            const fx_str_t strs_0[] = { prefix_0, slit_1, v_0 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, fx_result), _fx_cleanup);
         }
      }
   }

_fx_cleanup: ;
   FX_FREE_STR(&prefix_0);
   FX_FREE_STR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8id2str_mS1RM4id_t(struct _fx_R9Ast__id_t* i_0, fx_str_t* fx_result, void* fx_fv)
{
   fx_str_t prefix_0 = {0};
   fx_str_t mprefix_0 = {0};
   fx_str_t mprefix_1 = {0};
   fx_str_t prefix_1 = {0};
   fx_str_t v_0 = {0};
   int fx_status = 0;
   bool t_0;
   if ((bool)((i_0->m == _fx_g9Ast__noid.m) & (i_0->i == _fx_g9Ast__noid.i))) {
      t_0 = (bool)((i_0->m == 0) | (i_0->j == _fx_g9Ast__noid.j));
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, fx_result);
   }
   else {
      int_ v_1 = i_0->i;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_1), _fx_cleanup);
      fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_1), &prefix_0);
      if (i_0->m == 0) {
         fx_copy_str(&prefix_0, fx_result);
      }
      else {
         int_ v_2 = i_0->m;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_2), _fx_cleanup);
         _fx_R9Ast__id_t v_3 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_2))->u.defmodule_t.t0;
         bool t_1;
         if ((bool)((v_3.m == _fx_g9Ast__noid.m) & (v_3.i == _fx_g9Ast__noid.i))) {
            t_1 = (bool)((v_3.m == 0) | (v_3.j == _fx_g9Ast__noid.j));
         }
         else {
            t_1 = false;
         }
         if (t_1) {
            fx_str_t slit_1 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_1, &mprefix_0);
         }
         else {
            int_ v_4 = v_3.i;
            FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_4), _fx_cleanup);
            fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_4), &mprefix_0);
         }
         bool v_5;
         fx_str_t slit_2 = FX_MAKE_STR("Builtins");
         v_5 = _fx_F6__eq__B2SS(&mprefix_0, &slit_2, 0);
         if (v_5) {
            fx_str_t slit_3 = FX_MAKE_STR(""); fx_copy_str(&slit_3, &mprefix_1);
         }
         else {
            fx_str_t slit_4 = FX_MAKE_STR(".");
            {
               const fx_str_t strs_0[] = { mprefix_0, slit_4 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, &mprefix_1), _fx_cleanup);
            }
         }
         int_ v_6 = i_0->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_6), _fx_cleanup);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_6), &prefix_1);
         FX_CALL(_fx_F6stringS1i(i_0->j, &v_0, 0), _fx_cleanup);
         fx_str_t slit_5 = FX_MAKE_STR("@");
         {
            const fx_str_t strs_1[] = { mprefix_1, prefix_1, slit_5, v_0 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_1, 4, fx_result), _fx_cleanup);
         }
      }
   }

_fx_cleanup: ;
   FX_FREE_STR(&prefix_0);
   FX_FREE_STR(&mprefix_0);
   FX_FREE_STR(&mprefix_1);
   FX_FREE_STR(&prefix_1);
   FX_FREE_STR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1RM4id_t(struct _fx_R9Ast__id_t* i_0, fx_str_t* fx_result, void* fx_fv)
{
   fx_str_t prefix_0 = {0};
   fx_str_t v_0 = {0};
   int fx_status = 0;
   bool t_0;
   if ((bool)((i_0->m == _fx_g9Ast__noid.m) & (i_0->i == _fx_g9Ast__noid.i))) {
      t_0 = (bool)((i_0->m == 0) | (i_0->j == _fx_g9Ast__noid.j));
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, fx_result);
   }
   else {
      int_ v_1 = i_0->i;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_1), _fx_cleanup);
      fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_1), &prefix_0);
      if (i_0->m == 0) {
         fx_copy_str(&prefix_0, fx_result);
      }
      else {
         FX_CALL(_fx_F6stringS1i(i_0->j, &v_0, 0), _fx_cleanup);
         fx_str_t slit_1 = FX_MAKE_STR("@");
         {
            const fx_str_t strs_0[] = { prefix_0, slit_1, v_0 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, fx_result), _fx_cleanup);
         }
      }
   }

_fx_cleanup: ;
   FX_FREE_STR(&prefix_0);
   FX_FREE_STR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM2ppS1RM4id_t(struct _fx_R9Ast__id_t* i_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   bool t_0;
   if ((bool)((i_0->m == _fx_g9Ast__noid.m) & (i_0->i == _fx_g9Ast__noid.i))) {
      t_0 = (bool)((i_0->m == 0) | (i_0->j == _fx_g9Ast__noid.j));
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, fx_result);
   }
   else {
      int_ v_0 = i_0->i;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_0), _fx_cleanup);
      fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_0), fx_result);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11compile_errE2RM5loc_tS(
   struct _fx_R10Ast__loc_t* loc_0,
   fx_str_t* msg_0,
   fx_exn_t* fx_result,
   void* fx_fv)
{
   fx_str_t fname_0 = {0};
   fx_str_t v_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   int fx_status = 0;
   if (loc_0->m_idx >= 0) {
      int_ v_2 = loc_0->m_idx;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_2), _fx_cleanup);
      fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_2))->u.defmodule_t.t1, &fname_0);
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
   }
   FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_0, 0), _fx_cleanup);
   FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_1, 0), _fx_cleanup);
   fx_str_t slit_1 = FX_MAKE_STR(":");
   fx_str_t slit_2 = FX_MAKE_STR(":");
   fx_str_t slit_3 = FX_MAKE_STR(": error: ");
   {
      const fx_str_t strs_0[] = { fname_0, slit_1, v_0, slit_2, v_1, slit_3, *msg_0 };
      FX_CALL(fx_strjoin(0, 0, 0, strs_0, 7, &whole_msg_0), _fx_cleanup);
   }
   FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
   if (all_compile_err_ctx_0 == 0) {
      fx_copy_str(&whole_msg_0, &whole_msg_1);
   }
   else {
      _fx_LS v_3 = 0;
      FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_3), _fx_catch_0);
      fx_str_t slit_4 =
         FX_MAKE_STR("\n"
            U"\t");
      FX_CALL(_fx_F4joinS2SLS(&slit_4, v_3, &whole_msg_1, 0), _fx_catch_0);

   _fx_catch_0: ;
      if (v_3) {
         _fx_free_LS(&v_3);
      }
   }
   FX_CHECK_EXN(_fx_cleanup);
   FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_1, fx_result), _fx_cleanup);

_fx_cleanup: ;
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15compile_warningv2RM5loc_tS(struct _fx_R10Ast__loc_t* loc_0, fx_str_t* msg_0, void* fx_fv)
{
   fx_str_t fname_0 = {0};
   fx_str_t v_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t whole_msg_0 = {0};
   int fx_status = 0;
   if (loc_0->m_idx >= 0) {
      int_ v_2 = loc_0->m_idx;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_2), _fx_cleanup);
      fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_2))->u.defmodule_t.t1, &fname_0);
   }
   else {
      fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
   }
   FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_0, 0), _fx_cleanup);
   FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_1, 0), _fx_cleanup);
   fx_str_t slit_1 = FX_MAKE_STR(":");
   fx_str_t slit_2 = FX_MAKE_STR(":");
   fx_str_t slit_3 = FX_MAKE_STR(": warning: ");
   {
      const fx_str_t strs_0[] = { fname_0, slit_1, v_0, slit_2, v_1, slit_3, *msg_0 };
      FX_CALL(fx_strjoin(0, 0, 0, strs_0, 7, &whole_msg_0), _fx_cleanup);
   }
   _fx_F12print_stringv1S(&whole_msg_0, 0);
   fx_str_t slit_4 = FX_MAKE_STR("\n");
   _fx_F12print_stringv1S(&slit_4, 0);

_fx_cleanup: ;
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&whole_msg_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16push_compile_errv1E(fx_exn_t* err_0, void* fx_fv)
{
   _fx_LE v_0 = 0;
   int fx_status = 0;
   FX_CALL(_fx_cons_LE(err_0, _fx_g21Ast__all_compile_errs, true, &v_0), _fx_cleanup);
   _fx_free_LE(&_fx_g21Ast__all_compile_errs);
   FX_COPY_PTR(v_0, &_fx_g21Ast__all_compile_errs);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_LE(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18check_compile_errsv0(void* fx_fv)
{
   _fx_LE all_compile_errs_0 = 0;
   int fx_status = 0;
   FX_COPY_PTR(_fx_g21Ast__all_compile_errs, &all_compile_errs_0);
   if (all_compile_errs_0 != 0) {
      FX_THROW(&_fx_E26Ast__PropagateCompileErrorv, false, _fx_cleanup);
   }

_fx_cleanup: ;
   if (all_compile_errs_0) {
      _fx_free_LE(&all_compile_errs_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17print_compile_errv1E(fx_exn_t* err_0, void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = err_0->tag;
   if (tag_0 == _FX_EXN_E17Ast__CompileError) {
      _fx_F12print_stringv1S(&FX_EXN_DATA(_fx_E17Ast__CompileError_data_t, err_0->data).t1, 0);
      fx_str_t slit_0 = FX_MAKE_STR("\n");
      _fx_F12print_stringv1S(&slit_0, 0);
   }
   else if (tag_0 == _FX_EXN_E4Fail) {
      fx_str_t v_0 = {0};
      fx_str_t slit_1 = FX_MAKE_STR("Failure: ");
      fx_str_t* msg_0 = &FX_EXN_DATA(_fx_E4Fail_data_t, err_0->data);
      {
         const fx_str_t strs_0[] = { slit_1, *msg_0 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, &v_0), _fx_catch_0);
      }
      _fx_F12print_stringv1S(&v_0, 0);
      fx_str_t slit_2 = FX_MAKE_STR("\n");
      _fx_F12print_stringv1S(&slit_2, 0);

   _fx_catch_0: ;
      FX_FREE_STR(&v_0);
   }
   else {
      fx_str_t slit_3 =
         FX_MAKE_STR("\n"
            U"\n"
            U"Exception {err} occured");
      _fx_F12print_stringv1S(&slit_3, 0);
      fx_str_t slit_4 = FX_MAKE_STR("\n");
      _fx_F12print_stringv1S(&slit_4, 0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10pr_verbosev1S(fx_str_t* str_0, void* fx_fv)
{
   fx_str_t eol_0 = {0};
   fx_str_t v_0 = {0};
   int fx_status = 0;
   if (_fx_g12Options__opt.verbose) {
      bool v_1;
      fx_str_t slit_0 = FX_MAKE_STR("\n");
      v_1 = _fx_M6StringFM8endswithB2SS(str_0, &slit_0, 0);
      if (v_1) {
         fx_str_t slit_1 = FX_MAKE_STR(""); fx_copy_str(&slit_1, &eol_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("\n"); fx_copy_str(&slit_2, &eol_0);
      }
      {
         const fx_str_t strs_0[] = { *str_0, eol_0 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, &v_0), _fx_cleanup);
      }
      _fx_F12print_stringv1S(&v_0, 0);
      FX_CALL(_fx_M4FileFM5flushv1RM1t(&_fx_g12File__stdout, 0), _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_STR(&eol_0);
   FX_FREE_STR(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7id2idx_Ta2i2RM4id_tRM5loc_t(
   struct _fx_R9Ast__id_t* id_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_Ta2i* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if (id_0->m == 0) {
      fx_str_t v_0 = {0};
      fx_str_t fname_0 = {0};
      fx_str_t v_1 = {0};
      fx_str_t v_2 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_3 = {0};
      bool t_0;
      if ((bool)((id_0->m == _fx_g9Ast__noid.m) & (id_0->i == _fx_g9Ast__noid.i))) {
         t_0 = (bool)((id_0->m == 0) | (id_0->j == _fx_g9Ast__noid.j));
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, &v_0);
      }
      else {
         int_ v_4 = id_0->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_4), _fx_catch_1);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_4), &v_0);
      }
      if (loc_0->m_idx >= 0) {
         int_ v_5 = loc_0->m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_5), _fx_catch_1);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_5))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_1 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_1, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_1, 0), _fx_catch_1);
      FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_2, 0), _fx_catch_1);
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(": error: attempt to query information about unresolved \'");
      fx_str_t slit_5 = FX_MAKE_STR("\'");
      {
         const fx_str_t strs_0[] = { fname_0, slit_2, v_1, slit_3, v_2, slit_4, v_0, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 8, &whole_msg_0), _fx_catch_1);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_6 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_6), _fx_catch_0);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_6, &whole_msg_1, 0), _fx_catch_0);

      _fx_catch_0: ;
         if (v_6) {
            _fx_free_LS(&v_6);
         }
      }
      FX_CHECK_EXN(_fx_catch_1);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_1, &v_3), _fx_catch_1);
      FX_THROW(&v_3, true, _fx_catch_1);

   _fx_catch_1: ;
      fx_free_exn(&v_3);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_2);
      FX_FREE_STR(&v_1);
      FX_FREE_STR(&fname_0);
      FX_FREE_STR(&v_0);
   }
   else {
      _fx_Ta2i tup_0 = { id_0->m, id_0->j }; *fx_result = tup_0;
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6id2idxTa2i1RM4id_t(struct _fx_R9Ast__id_t* i_0, struct _fx_Ta2i* fx_result, void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM7id2idx_Ta2i2RM4id_tRM5loc_t(i_0, &_fx_g10Ast__noloc, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7id_infoN14Ast__id_info_t2RM4id_tRM5loc_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14Ast__id_info_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if (i_0->m == 0) {
      _fx_copy_N14Ast__id_info_t(&_fx_g11Ast__IdNone, fx_result);
   }
   else {
      _fx_Ta2i v_0;
      FX_CALL(_fx_M3AstFM7id2idx_Ta2i2RM4id_tRM5loc_t(i_0, loc_0, &v_0, 0), _fx_cleanup);
      int_ m_0 = v_0.t0;
      int_ j_0 = v_0.t1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_cleanup);
      FX_CHKIDX(
         FX_CHKIDX1((*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t9->u.t.t1, 0, j_0),
         _fx_cleanup);
      _fx_copy_N14Ast__id_info_t(
         FX_PTR_1D(_fx_N14Ast__id_info_t,
            (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t9->u.t.t1, j_0), fx_result);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12is_unique_idB1RM4id_t(struct _fx_R9Ast__id_t* i_0, bool* fx_result, void* fx_fv)
{
   int fx_status = 0;
   *fx_result = i_0->m > 0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13get_id_prefixi1S(fx_str_t* s_0, int_* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, s_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   if (idx_0 >= 0) {
      *fx_result = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_4 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_4);
         fx_copy_arr(&new_data_0, v_4);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_5 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      FX_FREE_STR(v_5);
      fx_copy_str(s_0, v_5);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      *fx_result = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_6 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_6), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_6))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_1 = FX_MAKE_STR(":");
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_1, v_1, slit_2, v_2, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_7 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_7), _fx_catch_1);
         fx_str_t slit_4 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_4, v_7, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_7) {
            _fx_free_LS(&v_7);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6get_idRM4id_t1S(fx_str_t* s_0, struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, s_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      FX_FREE_STR(v_6);
      fx_copy_str(s_0, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_1 = FX_MAKE_STR(":");
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_1, v_1, slit_2, v_2, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_4 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_4, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6gen_idRM4id_t2iS(int_ m_idx_0, fx_str_t* s_0, struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, s_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      FX_FREE_STR(v_6);
      fx_copy_str(s_0, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_1 = FX_MAKE_STR(":");
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_1, v_1, slit_2, v_2, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_4 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_4, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   int_ v_9;
   FX_CALL(_fx_M3AstFM10new_id_idxi1i(m_idx_0, &v_9, 0), _fx_cleanup);
   _fx_R9Ast__id_t rec_0 = { m_idx_0, v_4, v_9 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6dup_idRM4id_t2iRM4id_t(
   int_ m_idx_0,
   struct _fx_R9Ast__id_t* old_id_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int_ j_0;
   FX_CALL(_fx_M3AstFM10new_id_idxi1i(m_idx_0, &j_0, 0), _fx_cleanup);
   _fx_R9Ast__id_t rec_0 = { m_idx_0, old_id_0->i, j_0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_orig_idRM4id_t1RM4id_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_R9Ast__id_t rec_0 = { 0, i_0->i, 0 };
   *fx_result = rec_0;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12set_id_entryv2RM4id_tN14Ast__id_info_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_N14Ast__id_info_t* n_0,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = n_0->tag;
   _fx_R10Ast__loc_t loc_0;
   bool res_0;
   if (tag_0 == 1) {
      res_0 = true;
   }
   else if (tag_0 == 8) {
      res_0 = true;
   }
   else {
      res_0 = false;
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (res_0) {
      loc_0 = _fx_g10Ast__noloc; goto _fx_endmatch_0;
   }
   if (tag_0 == 2) {
      loc_0 = n_0->u.IdDVal.dv_loc; goto _fx_endmatch_0;
   }
   if (tag_0 == 3) {
      _fx_R13Ast__deffun_t v_0 = {0};
      _fx_copy_R13Ast__deffun_t(&n_0->u.IdFun->data, &v_0);
      loc_0 = v_0.df_loc;
      _fx_free_R13Ast__deffun_t(&v_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 4) {
      _fx_R13Ast__defexn_t v_1 = {0};
      _fx_copy_R13Ast__defexn_t(&n_0->u.IdExn->data, &v_1);
      loc_0 = v_1.dexn_loc;
      _fx_free_R13Ast__defexn_t(&v_1);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 5) {
      _fx_R13Ast__deftyp_t v_2 = {0};
      _fx_copy_R13Ast__deftyp_t(&n_0->u.IdTyp->data, &v_2);
      loc_0 = v_2.dt_loc;
      _fx_free_R13Ast__deftyp_t(&v_2);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 6) {
      _fx_R17Ast__defvariant_t v_3 = {0};
      _fx_copy_R17Ast__defvariant_t(&n_0->u.IdVariant->data, &v_3);
      loc_0 = v_3.dvar_loc;
      _fx_free_R17Ast__defvariant_t(&v_3);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 7) {
      _fx_R19Ast__definterface_t v_4 = {0};
      _fx_copy_R19Ast__definterface_t(&n_0->u.IdInterface->data, &v_4);
      loc_0 = v_4.di_loc;
      _fx_free_R19Ast__definterface_t(&v_4);
      goto _fx_endmatch_0;
   }
   loc_0 = _fx_g10Ast__noloc;

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   _fx_Ta2i v_5;
   FX_CALL(_fx_M3AstFM7id2idx_Ta2i2RM4id_tRM5loc_t(i_0, &loc_0, &v_5, 0), _fx_cleanup);
   int_ m_idx_0 = v_5.t0;
   int_ idx_0 = v_5.t1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   FX_CHKIDX(
      FX_CHKIDX1((*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t9->u.t.t1, 0, idx_0),
      _fx_cleanup);
   _fx_N14Ast__id_info_t* v_6 =
      FX_PTR_1D(_fx_N14Ast__id_info_t,
         (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t9->u.t.t1, idx_0);
   _fx_free_N14Ast__id_info_t(v_6);
   _fx_copy_N14Ast__id_info_t(n_0, v_6);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_exp_ctxT2N10Ast__typ_tRM5loc_t1N10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* fx_result,
   void* fx_fv)
{
   _fx_T2N10Ast__typ_tR10Ast__loc_t result_0 = {0};
   _fx_N10Ast__exp_t e_1 = 0;
   int fx_status = 0;
   FX_COPY_PTR(e_0, &e_1);
   for (;;) {
      _fx_N10Ast__exp_t e_2 = 0;
      FX_COPY_PTR(e_1, &e_2);
      int tag_0 = FX_REC_VARIANT_TAG(e_2);
      if (tag_0 == 1) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_1 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpNop, &result_1);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_1, &result_0);
         FX_BREAK(_fx_catch_0);

      _fx_catch_0: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_1);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 2) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_2 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpBreak.t1, &result_2);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_2, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_2);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 3) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_3 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpContinue, &result_3);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_3, &result_0);
         FX_BREAK(_fx_catch_2);

      _fx_catch_2: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_3);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 4) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_4 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpReturn.t1, &result_4);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_4, &result_0);
         FX_BREAK(_fx_catch_3);

      _fx_catch_3: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_4);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 5) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_5 = &e_2->u.ExpRange.t3;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_5, &result_0);
         FX_BREAK(_fx_catch_4);

      _fx_catch_4: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 6) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_6 = &e_2->u.ExpLit.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_6, &result_0);
         FX_BREAK(_fx_catch_5);

      _fx_catch_5: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 7) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_7 = &e_2->u.ExpIdent.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_7, &result_0);
         FX_BREAK(_fx_catch_6);

      _fx_catch_6: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 8) {
         _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_0 = &e_2->u.ExpBinary;
         if (FX_REC_VARIANT_TAG(vcase_0->t0) == 27) {
            _fx_T2N10Ast__typ_tR10Ast__loc_t result_8 = {0};
            _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &vcase_0->t3.t1, &result_8);
            _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
            _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_8, &result_0);
            FX_BREAK(_fx_catch_7);

         _fx_catch_7: ;
            _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_8);
            goto _fx_endmatch_0;
         }
      }
      if (tag_0 == 8) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_9 = &e_2->u.ExpBinary.t3;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_9, &result_0);
         FX_BREAK(_fx_catch_8);

      _fx_catch_8: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 9) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_10 = &e_2->u.ExpUnary.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_10, &result_0);
         FX_BREAK(_fx_catch_9);

      _fx_catch_9: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 10) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_11 = &e_2->u.ExpIntrin.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_11, &result_0);
         FX_BREAK(_fx_catch_10);

      _fx_catch_10: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 11) {
         _fx_N10Ast__exp_t* e_3 = &e_2->u.ExpSync.t1;
         _fx_free_N10Ast__exp_t(&e_1);
         FX_COPY_PTR(*e_3, &e_1);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 12) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_12 = &e_2->u.ExpSeq.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_12, &result_0);
         FX_BREAK(_fx_catch_11);

      _fx_catch_11: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 13) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_13 = &e_2->u.ExpMkTuple.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_13, &result_0);
         FX_BREAK(_fx_catch_12);

      _fx_catch_12: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 16) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_14 = &e_2->u.ExpMkRecord.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_14, &result_0);
         FX_BREAK(_fx_catch_13);

      _fx_catch_13: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 14) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_15 = &e_2->u.ExpMkArray.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_15, &result_0);
         FX_BREAK(_fx_catch_14);

      _fx_catch_14: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 15) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_16 = &e_2->u.ExpMkVector.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_16, &result_0);
         FX_BREAK(_fx_catch_15);

      _fx_catch_15: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 17) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_17 = &e_2->u.ExpUpdateRecord.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_17, &result_0);
         FX_BREAK(_fx_catch_16);

      _fx_catch_16: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 18) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_18 = &e_2->u.ExpCall.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_18, &result_0);
         FX_BREAK(_fx_catch_17);

      _fx_catch_17: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 19) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_19 = &e_2->u.ExpAt.t4;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_19, &result_0);
         FX_BREAK(_fx_catch_18);

      _fx_catch_18: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 20) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_20 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpAssign.t2, &result_20);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_20, &result_0);
         FX_BREAK(_fx_catch_19);

      _fx_catch_19: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_20);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 21) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_21 = &e_2->u.ExpMem.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_21, &result_0);
         FX_BREAK(_fx_catch_20);

      _fx_catch_20: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 22) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_22 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g11Ast__TypErr, &e_2->u.ExpThrow.t1, &result_22);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_22, &result_0);
         FX_BREAK(_fx_catch_21);

      _fx_catch_21: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_22);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 23) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_23 = &e_2->u.ExpIf.t3;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_23, &result_0);
         FX_BREAK(_fx_catch_22);

      _fx_catch_22: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 24) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_24 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpWhile.t2, &result_24);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_24, &result_0);
         FX_BREAK(_fx_catch_23);

      _fx_catch_23: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_24);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 25) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_25 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpDoWhile.t2, &result_25);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_25, &result_0);
         FX_BREAK(_fx_catch_24);

      _fx_catch_24: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_25);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 26) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_26 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypVoid, &e_2->u.ExpFor.t4, &result_26);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_26, &result_0);
         FX_BREAK(_fx_catch_25);

      _fx_catch_25: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_26);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 27) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_27 = &e_2->u.ExpMap.t3;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_27, &result_0);
         FX_BREAK(_fx_catch_26);

      _fx_catch_26: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 28) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_28 = &e_2->u.ExpTryCatch.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_28, &result_0);
         FX_BREAK(_fx_catch_27);

      _fx_catch_27: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 29) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_29 = &e_2->u.ExpMatch.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_29, &result_0);
         FX_BREAK(_fx_catch_28);

      _fx_catch_28: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 30) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_30 = &e_2->u.ExpCast.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_30, &result_0);
         FX_BREAK(_fx_catch_29);

      _fx_catch_29: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 31) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_31 = &e_2->u.ExpTyped.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_31, &result_0);
         FX_BREAK(_fx_catch_30);

      _fx_catch_30: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 32) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_32 = &e_2->u.ExpCCode.t1;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_32, &result_0);
         FX_BREAK(_fx_catch_31);

      _fx_catch_31: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 33) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t* result_33 = &e_2->u.ExpData.t2;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(result_33, &result_0);
         FX_BREAK(_fx_catch_32);

      _fx_catch_32: ;
         goto _fx_endmatch_0;
      }
      if (tag_0 == 34) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_34 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &e_2->u.DefVal.t3, &result_34);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_34, &result_0);
         FX_BREAK(_fx_catch_33);

      _fx_catch_33: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_34);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 35) {
         _fx_R13Ast__deffun_t v_0 = {0};
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_35 = {0};
         _fx_copy_R13Ast__deffun_t(&e_2->u.DefFun->data, &v_0);
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &v_0.df_loc, &result_35);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_35, &result_0);
         FX_BREAK(_fx_catch_34);

      _fx_catch_34: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_35);
         _fx_free_R13Ast__deffun_t(&v_0);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 36) {
         _fx_R13Ast__defexn_t v_1 = {0};
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_36 = {0};
         _fx_copy_R13Ast__defexn_t(&e_2->u.DefExn->data, &v_1);
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &v_1.dexn_loc, &result_36);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_36, &result_0);
         FX_BREAK(_fx_catch_35);

      _fx_catch_35: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_36);
         _fx_free_R13Ast__defexn_t(&v_1);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 37) {
         _fx_R13Ast__deftyp_t v_2 = {0};
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_37 = {0};
         _fx_copy_R13Ast__deftyp_t(&e_2->u.DefTyp->data, &v_2);
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &v_2.dt_loc, &result_37);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_37, &result_0);
         FX_BREAK(_fx_catch_36);

      _fx_catch_36: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_37);
         _fx_free_R13Ast__deftyp_t(&v_2);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 38) {
         _fx_R17Ast__defvariant_t v_3 = {0};
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_38 = {0};
         _fx_copy_R17Ast__defvariant_t(&e_2->u.DefVariant->data, &v_3);
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &v_3.dvar_loc, &result_38);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_38, &result_0);
         FX_BREAK(_fx_catch_37);

      _fx_catch_37: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_38);
         _fx_free_R17Ast__defvariant_t(&v_3);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 39) {
         _fx_R19Ast__definterface_t v_4 = {0};
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_39 = {0};
         _fx_copy_R19Ast__definterface_t(&e_2->u.DefInterface->data, &v_4);
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &v_4.di_loc, &result_39);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_39, &result_0);
         FX_BREAK(_fx_catch_38);

      _fx_catch_38: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_39);
         _fx_free_R19Ast__definterface_t(&v_4);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 40) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_40 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &e_2->u.DirImport.t1, &result_40);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_40, &result_0);
         FX_BREAK(_fx_catch_39);

      _fx_catch_39: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_40);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 41) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_41 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &e_2->u.DirImportFrom.t2, &result_41);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_41, &result_0);
         FX_BREAK(_fx_catch_40);

      _fx_catch_40: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_41);
         goto _fx_endmatch_0;
      }
      if (tag_0 == 42) {
         _fx_T2N10Ast__typ_tR10Ast__loc_t result_42 = {0};
         _fx_make_T2N10Ast__typ_tR10Ast__loc_t(_fx_g12Ast__TypDecl, &e_2->u.DirPragma.t1, &result_42);
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
         _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_42, &result_0);
         FX_BREAK(_fx_catch_41);

      _fx_catch_41: ;
         _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_42);
         goto _fx_endmatch_0;
      }
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_42);

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_42);

   _fx_catch_42: ;
      if (e_2) {
         _fx_free_N10Ast__exp_t(&e_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_T2N10Ast__typ_tR10Ast__loc_t(&result_0, fx_result);

_fx_cleanup: ;
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&result_0);
   if (e_1) {
      _fx_free_N10Ast__exp_t(&e_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_exp_typN10Ast__typ_t1N10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_T2N10Ast__typ_tR10Ast__loc_t v_0 = {0};
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM11get_exp_ctxT2N10Ast__typ_tRM5loc_t1N10Ast__exp_t(e_0, &v_0, 0), _fx_cleanup);
   FX_COPY_PTR(v_0.t0, fx_result);

_fx_cleanup: ;
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_exp_locRM5loc_t1N10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv)
{
   _fx_T2N10Ast__typ_tR10Ast__loc_t v_0 = {0};
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM11get_exp_ctxT2N10Ast__typ_tRM5loc_t1N10Ast__exp_t(e_0, &v_0, 0), _fx_cleanup);
   *fx_result = v_0.t1;

_fx_cleanup: ;
   _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_pat_locRM5loc_t1N10Ast__pat_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = FX_REC_VARIANT_TAG(p_0);
   if (tag_0 == 1) {
      *fx_result = p_0->u.PatAny;
   }
   else if (tag_0 == 2) {
      *fx_result = p_0->u.PatLit.t1;
   }
   else if (tag_0 == 3) {
      *fx_result = p_0->u.PatIdent.t1;
   }
   else if (tag_0 == 4) {
      *fx_result = p_0->u.PatTuple.t1;
   }
   else if (tag_0 == 5) {
      *fx_result = p_0->u.PatVariant.t2;
   }
   else if (tag_0 == 6) {
      *fx_result = p_0->u.PatRecord.t2;
   }
   else if (tag_0 == 7) {
      *fx_result = p_0->u.PatCons.t2;
   }
   else if (tag_0 == 8) {
      *fx_result = p_0->u.PatAs.t2;
   }
   else if (tag_0 == 9) {
      *fx_result = p_0->u.PatTyped.t2;
   }
   else if (tag_0 == 12) {
      *fx_result = p_0->u.PatRef.t1;
   }
   else if (tag_0 == 10) {
      *fx_result = p_0->u.PatWhen.t2;
   }
   else if (tag_0 == 11) {
      *fx_result = p_0->u.PatAlt.t1;
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14pat_skip_typedN10Ast__pat_t1N10Ast__pat_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N10Ast__pat_t result_0 = 0;
   _fx_N10Ast__pat_t p_1 = 0;
   int fx_status = 0;
   FX_COPY_PTR(p_0, &p_1);
   for (;;) {
      _fx_N10Ast__pat_t p_2 = 0;
      FX_COPY_PTR(p_1, &p_2);
      if (FX_REC_VARIANT_TAG(p_2) == 9) {
         _fx_N10Ast__pat_t* p_3 = &p_2->u.PatTyped.t0; _fx_free_N10Ast__pat_t(&p_1); FX_COPY_PTR(*p_3, &p_1);
      }
      else {
         _fx_free_N10Ast__pat_t(&result_0); FX_COPY_PTR(p_2, &result_0); FX_BREAK(_fx_catch_0);  _fx_catch_0: ;
      }
      FX_CHECK_EXN(_fx_catch_1);

   _fx_catch_1: ;
      if (p_2) {
         _fx_free_N10Ast__pat_t(&p_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(result_0, fx_result);

_fx_cleanup: ;
   if (result_0) {
      _fx_free_N10Ast__pat_t(&result_0);
   }
   if (p_1) {
      _fx_free_N10Ast__pat_t(&p_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10get_moduleN16Ast__defmodule_t1i(
   int_ m_0,
   struct _fx_N16Ast__defmodule_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_cleanup);
   FX_COPY_PTR(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0), fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10get_moduleN16Ast__defmodule_t2RM4id_tRM5loc_t(
   struct _fx_R9Ast__id_t* m_id_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N16Ast__defmodule_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N14Ast__id_info_t v_0 = {0};
   int fx_status = 0;
   if (m_id_0->m == 0) {
      _fx_copy_N14Ast__id_info_t(&_fx_g11Ast__IdNone, &v_0);
   }
   else {
      _fx_Ta2i v_1;
      FX_CALL(_fx_M3AstFM7id2idx_Ta2i2RM4id_tRM5loc_t(m_id_0, loc_0, &v_1, 0), _fx_cleanup);
      int_ m_0 = v_1.t0;
      int_ j_0 = v_1.t1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_cleanup);
      FX_CHKIDX(
         FX_CHKIDX1((*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t9->u.t.t1, 0, j_0),
         _fx_cleanup);
      _fx_copy_N14Ast__id_info_t(
         FX_PTR_1D(_fx_N14Ast__id_info_t,
            (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t9->u.t.t1, j_0), &v_0);
   }
   if (v_0.tag == 8) {
      int_ m_idx_0 = v_0.u.IdModule;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_catch_0);
      FX_COPY_PTR(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0), fx_result);

   _fx_catch_0: ;
   }
   else {
      fx_str_t v_2 = {0};
      fx_str_t fname_0 = {0};
      fx_str_t v_3 = {0};
      fx_str_t v_4 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_5 = {0};
      bool t_0;
      if ((bool)((m_id_0->m == _fx_g9Ast__noid.m) & (m_id_0->i == _fx_g9Ast__noid.i))) {
         t_0 = (bool)((m_id_0->m == 0) | (m_id_0->j == _fx_g9Ast__noid.j));
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, &v_2);
      }
      else {
         int_ v_6 = m_id_0->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_6), _fx_catch_2);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_6), &v_2);
      }
      if (loc_0->m_idx >= 0) {
         int_ v_7 = loc_0->m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_catch_2);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_1 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_1, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_3, 0), _fx_catch_2);
      FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_4, 0), _fx_catch_2);
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(": error: identifier \'");
      fx_str_t slit_5 = FX_MAKE_STR("\' is not a module");
      {
         const fx_str_t strs_0[] = { fname_0, slit_2, v_3, slit_3, v_4, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 8, &whole_msg_0), _fx_catch_2);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_catch_2);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_1, &v_5), _fx_catch_2);
      FX_THROW(&v_5, true, _fx_catch_2);

   _fx_catch_2: ;
      fx_free_exn(&v_5);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_4);
      FX_FREE_STR(&v_3);
      FX_FREE_STR(&fname_0);
      FX_FREE_STR(&v_2);
   }

_fx_cleanup: ;
   _fx_free_N14Ast__id_info_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15get_module_nameRM4id_t1i(int_ m_0, struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_cleanup);
   *fx_result = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t0;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14get_module_envRt6Map__t2RM4id_tLN16Ast__env_entry_t1i(
   int_ m_0,
   struct _fx_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_cleanup);
   _fx_copy_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(
      &(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t6, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11find_modulei2RM4id_tS(
   struct _fx_R9Ast__id_t* mname_0,
   fx_str_t* mfname_0,
   int_* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_Ta2i v_0;
   FX_CALL(_fx_M3AstFM9find_idx_Ta2i2Nt10Hashmap__t2SiS(_fx_g21Ast__all_modules_hash, mfname_0, &v_0, 0), _fx_cleanup);
   int_ j_0 = v_0.t1;
   _fx_Nt6option1i v_1;
   if (j_0 >= 0) {
      FX_CHKIDX(FX_CHKIDX1(_fx_g21Ast__all_modules_hash->u.t.t5, 0, j_0), _fx_cleanup);
      _fx_M3AstFM4SomeNt6option1i1i(FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g21Ast__all_modules_hash->u.t.t5, j_0)->data,
         &v_1);
   }
   else {
      v_1 = _fx_g11Ast__None5_;
   }
   if (v_1.tag == 2) {
      *fx_result = v_1.u.Some;
   }
   else {
      fx_arr_t v_2 = {0};
      _fx_Nt9Dynvec__t1N14Ast__id_info_t v_3 = 0;
      _fx_N16Ast__defmodule_t newmodule_0 = 0;
      fx_arr_t saved_modules_0 = {0};
      fx_arr_t v_4 = {0};
      int_ m_idx_0 = FX_ARR_SIZE(_fx_g16Ast__all_modules, 0);
      _fx_N14Ast__id_info_t* dstptr_0 = 0;
      {
         const int_ shape_0[] = { 0 };
         FX_CALL(
            fx_make_arr(1, shape_0, sizeof(_fx_N14Ast__id_info_t), (fx_free_t)_fx_free_N14Ast__id_info_t,
               (fx_copy_t)_fx_copy_N14Ast__id_info_t, 0, &v_2), _fx_catch_1);
      }
      dstptr_0 = (_fx_N14Ast__id_info_t*)v_2.data;
      for (int_ i_0 = 0; i_0 < 0; i_0++, dstptr_0++) {
         _fx_copy_N14Ast__id_info_t(&_fx_g11Ast__IdNone, dstptr_0);
      }
      FX_CALL(
         _fx_M3AstFM1tNt9Dynvec__t1N14Ast__id_info_t3iA1N14Ast__id_info_tN14Ast__id_info_t(0, &v_2, &_fx_g11Ast__IdNone, &v_3),
         _fx_catch_1);
      FX_CALL(
         _fx_M3AstFM11defmodule_tN16Ast__defmodule_t10RM4id_tSiBLN10Ast__exp_tLiRt6Map__t2RM4id_tLN16Ast__env_entry_tBiNt9Dynvec__t1N14Ast__id_info_t(
            mname_0, mfname_0, m_idx_0, true, 0, 0, &_fx_g14Ast__empty_env, false, -1, v_3, &newmodule_0), _fx_catch_1);
      fx_copy_arr(&_fx_g16Ast__all_modules, &saved_modules_0);
      _fx_N16Ast__defmodule_t* dstptr_1 = 0;
      int_ v_5 = m_idx_0 + 1;
      {
         const int_ shape_1[] = { v_5 };
         FX_CALL(
            fx_make_arr(1, shape_1, sizeof(_fx_N16Ast__defmodule_t), (fx_free_t)_fx_free_N16Ast__defmodule_t,
               (fx_copy_t)fx_copy_ptr, 0, &v_4), _fx_catch_1);
      }
      dstptr_1 = (_fx_N16Ast__defmodule_t*)v_4.data;
      for (int_ i_1 = 0; i_1 < v_5; i_1++, dstptr_1++) {
         _fx_N16Ast__defmodule_t t_0 = 0;
         if (i_1 < m_idx_0) {
            FX_CHKIDX(FX_CHKIDX1(saved_modules_0, 0, i_1), _fx_catch_0);
            FX_COPY_PTR(*FX_PTR_1D(_fx_N16Ast__defmodule_t, saved_modules_0, i_1), &t_0);
         }
         else {
            FX_COPY_PTR(newmodule_0, &t_0);
         }
         FX_COPY_PTR(t_0, dstptr_1);

      _fx_catch_0: ;
         if (t_0) {
            _fx_free_N16Ast__defmodule_t(&t_0);
         }
         FX_CHECK_EXN(_fx_catch_1);
      }
      FX_FREE_ARR(&_fx_g16Ast__all_modules);
      fx_copy_arr(&v_4, &_fx_g16Ast__all_modules);
      int_ idx_0;
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g21Ast__all_modules_hash, mfname_0, &idx_0, 0),
         _fx_catch_1);
      FX_CHKIDX(FX_CHKIDX1(_fx_g21Ast__all_modules_hash->u.t.t5, 0, idx_0), _fx_catch_1);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g21Ast__all_modules_hash->u.t.t5, idx_0)->data = m_idx_0;
      *fx_result = m_idx_0;

   _fx_catch_1: ;
      FX_FREE_ARR(&v_4);
      FX_FREE_ARR(&saved_modules_0);
      if (newmodule_0) {
         _fx_free_N16Ast__defmodule_t(&newmodule_0);
      }
      if (v_3) {
         _fx_free_Nt9Dynvec__t1N14Ast__id_info_t(&v_3);
      }
      FX_FREE_ARR(&v_2);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15new_block_scopeN12Ast__scope_t1i(int_ m_idx_0, struct _fx_N12Ast__scope_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   int_ new_block_idx_0 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 + 1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 = new_block_idx_0;
   _fx_M3AstFM7ScBlockN12Ast__scope_t1i(new_block_idx_0, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14new_loop_scopeN12Ast__scope_t2iB(
   int_ m_idx_0,
   bool nested_0,
   struct _fx_N12Ast__scope_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   int_ new_block_idx_0 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 + 1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 = new_block_idx_0;
   _fx_M3AstFM6ScLoopN12Ast__scope_t2Bi(nested_0, new_block_idx_0, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13new_map_scopeN12Ast__scope_t1i(int_ m_idx_0, struct _fx_N12Ast__scope_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   int_ new_block_idx_0 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 + 1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 = new_block_idx_0;
   _fx_M3AstFM5ScMapN12Ast__scope_t1i(new_block_idx_0, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM17new_arr_map_scopeN12Ast__scope_t1i(
   int_ m_idx_0,
   struct _fx_N12Ast__scope_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   int_ new_block_idx_0 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 + 1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 = new_block_idx_0;
   _fx_M3AstFM8ScArrMapN12Ast__scope_t1i(new_block_idx_0, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14new_fold_scopeN12Ast__scope_t1i(int_ m_idx_0, struct _fx_N12Ast__scope_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   int_ new_block_idx_0 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 + 1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 = new_block_idx_0;
   _fx_M3AstFM6ScFoldN12Ast__scope_t1i(new_block_idx_0, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13new_try_scopeN12Ast__scope_t1i(int_ m_idx_0, struct _fx_N12Ast__scope_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   int_ new_block_idx_0 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 + 1;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_idx_0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_idx_0))->u.defmodule_t.t8 = new_block_idx_0;
   _fx_M3AstFM5ScTryN12Ast__scope_t1i(new_block_idx_0, fx_result);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16get_module_scopeLN12Ast__scope_t1LN12Ast__scope_t(
   struct _fx_LN12Ast__scope_t_data_t* sc_0,
   struct _fx_LN12Ast__scope_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_LN12Ast__scope_t result_0 = 0;
   _fx_LN12Ast__scope_t sc_1 = 0;
   int fx_status = 0;
   FX_COPY_PTR(sc_0, &sc_1);
   for (;;) {
      _fx_LN12Ast__scope_t sc_2 = 0;
      FX_COPY_PTR(sc_1, &sc_2);
      if (sc_2 != 0) {
         if (sc_2->hd.tag == 10) {
            FX_FREE_LIST_SIMPLE(&result_0);
            FX_COPY_PTR(sc_2, &result_0);
            FX_BREAK(_fx_catch_0);

         _fx_catch_0: ;
            goto _fx_endmatch_0;
         }
      }
      if (sc_2 != 0) {
         _fx_LN12Ast__scope_t* rest_0 = &sc_2->tl; FX_FREE_LIST_SIMPLE(&sc_1); FX_COPY_PTR(*rest_0, &sc_1); goto _fx_endmatch_0;
      }
      FX_FREE_LIST_SIMPLE(&result_0);
      result_0 = 0;
      FX_BREAK(_fx_catch_1);

   _fx_catch_1: ;

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_LIST_SIMPLE(&sc_2);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(result_0, fx_result);

_fx_cleanup: ;
   FX_FREE_LIST_SIMPLE(&result_0);
   FX_FREE_LIST_SIMPLE(&sc_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11curr_modulei1LN12Ast__scope_t(
   struct _fx_LN12Ast__scope_t_data_t* sc_0,
   int_* fx_result,
   void* fx_fv)
{
   _fx_LN12Ast__scope_t sc_1 = 0;
   int fx_status = 0;
   int_ result_0 = 0;
   FX_COPY_PTR(sc_0, &sc_1);
   for (;;) {
      _fx_LN12Ast__scope_t sc_2 = 0;
      FX_COPY_PTR(sc_1, &sc_2);
      if (sc_2 != 0) {
         _fx_N12Ast__scope_t* v_0 = &sc_2->hd;
         if (v_0->tag == 10) {
            result_0 = v_0->u.ScModule; FX_BREAK(_fx_catch_0);  _fx_catch_0: ; goto _fx_endmatch_0;
         }
      }
      if (sc_2 != 0) {
         _fx_LN12Ast__scope_t* rest_0 = &sc_2->tl; FX_FREE_LIST_SIMPLE(&sc_1); FX_COPY_PTR(*rest_0, &sc_1); goto _fx_endmatch_0;
      }
      result_0 = -1;
      FX_BREAK(_fx_catch_1);

   _fx_catch_1: ;

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      FX_FREE_LIST_SIMPLE(&sc_2);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   *fx_result = result_0;

_fx_cleanup: ;
   FX_FREE_LIST_SIMPLE(&sc_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15is_global_scopeB1LN12Ast__scope_t(
   struct _fx_LN12Ast__scope_t_data_t* sc_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if (sc_0 != 0) {
      if (sc_0->hd.tag == 10) {
         *fx_result = true; goto _fx_endmatch_0;
      }
   }
   if (sc_0 == 0) {
      *fx_result = true; goto _fx_endmatch_0;
   }
   *fx_result = false;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18get_qualified_nameS2SLN12Ast__scope_t(
   fx_str_t* name_0,
   struct _fx_LN12Ast__scope_t_data_t* sc_0,
   fx_str_t* fx_result,
   void* fx_fv)
{
   fx_str_t result_0 = {0};
   fx_str_t name_1 = {0};
   _fx_LN12Ast__scope_t sc_1 = 0;
   int fx_status = 0;
   fx_copy_str(name_0, &name_1);
   FX_COPY_PTR(sc_0, &sc_1);
   for (;;) {
      fx_str_t name_2 = {0};
      _fx_LN12Ast__scope_t sc_2 = 0;
      fx_str_t v_0 = {0};
      fx_copy_str(&name_1, &name_2);
      FX_COPY_PTR(sc_1, &sc_2);
      if (sc_2 != 0) {
         _fx_N12Ast__scope_t* v_1 = &sc_2->hd;
         if (v_1->tag == 10) {
            int_ m_0 = v_1->u.ScModule;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_catch_3);
            _fx_R9Ast__id_t v_2 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t0;
            bool t_0;
            if ((bool)((v_2.m == _fx_g9Ast__noid.m) & (v_2.i == _fx_g9Ast__noid.i))) {
               t_0 = (bool)((v_2.m == 0) | (v_2.j == _fx_g9Ast__noid.j));
            }
            else {
               t_0 = false;
            }
            if (t_0) {
               fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, &v_0);
            }
            else {
               int_ v_3 = v_2.i;
               FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_3), _fx_catch_3);
               fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_3), &v_0);
            }
            fx_str_t slit_1 = FX_MAKE_STR("Builtins");
            if (_fx_F6__eq__B2SS(&v_0, &slit_1, 0)) {
               FX_FREE_STR(&result_0);
               fx_copy_str(&name_2, &result_0);
               FX_BREAK(_fx_catch_0);

            _fx_catch_0: ;
               goto _fx_endmatch_0;
            }
         }
      }
      if (sc_2 != 0) {
         _fx_N12Ast__scope_t* v_4 = &sc_2->hd;
         if (v_4->tag == 10) {
            fx_str_t v_5 = {0};
            fx_str_t v_6 = {0};
            int_ m_1 = v_4->u.ScModule;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_1), _fx_catch_1);
            _fx_R9Ast__id_t v_7 = (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_1))->u.defmodule_t.t0;
            bool t_1;
            if ((bool)((v_7.m == _fx_g9Ast__noid.m) & (v_7.i == _fx_g9Ast__noid.i))) {
               t_1 = (bool)((v_7.m == 0) | (v_7.j == _fx_g9Ast__noid.j));
            }
            else {
               t_1 = false;
            }
            if (t_1) {
               fx_str_t slit_2 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_2, &v_5);
            }
            else {
               int_ v_8 = v_7.i;
               FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_8), _fx_catch_1);
               fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_8), &v_5);
            }
            fx_str_t slit_3 = FX_MAKE_STR(".");
            {
               const fx_str_t strs_0[] = { v_5, slit_3, name_2 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, &v_6), _fx_catch_1);
            }
            FX_FREE_STR(&name_1);
            fx_copy_str(&v_6, &name_1);
            _fx_LN12Ast__scope_t* r_0 = &sc_2->tl;
            FX_FREE_LIST_SIMPLE(&sc_1);
            FX_COPY_PTR(*r_0, &sc_1);

         _fx_catch_1: ;
            FX_FREE_STR(&v_6);
            FX_FREE_STR(&v_5);
            goto _fx_endmatch_0;
         }
      }
      if (sc_2 == 0) {
         FX_FREE_STR(&result_0); fx_copy_str(&name_2, &result_0); FX_BREAK(_fx_catch_2);  _fx_catch_2: ; goto _fx_endmatch_0;
      }
      if (sc_2 != 0) {
         FX_FREE_STR(&name_1);
         fx_copy_str(&name_2, &name_1);
         _fx_LN12Ast__scope_t* r_1 = &sc_2->tl;
         FX_FREE_LIST_SIMPLE(&sc_1);
         FX_COPY_PTR(*r_1, &sc_1);
         goto _fx_endmatch_0;
      }
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_3);

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_3);

   _fx_catch_3: ;
      FX_FREE_STR(&v_0);
      FX_FREE_LIST_SIMPLE(&sc_2);
      FX_FREE_STR(&name_2);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_copy_str(&result_0, fx_result);

_fx_cleanup: ;
   FX_FREE_STR(&result_0);
   FX_FREE_STR(&name_1);
   FX_FREE_LIST_SIMPLE(&sc_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13get_bare_nameRM4id_t1RM4id_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   fx_str_t n_str_0 = {0};
   fx_str_t v_0 = {0};
   fx_arr_t v_1 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_2 = {0};
   fx_str_t v_3 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_4 = {0};
   int fx_status = 0;
   bool t_0;
   if ((bool)((n_0->m == _fx_g9Ast__noid.m) & (n_0->i == _fx_g9Ast__noid.i))) {
      t_0 = (bool)((n_0->m == 0) | (n_0->j == _fx_g9Ast__noid.j));
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, &n_str_0);
   }
   else {
      int_ v_5 = n_0->i;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_5), _fx_cleanup);
      fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_5), &n_str_0);
   }
   int_ dot_pos_0 = _fx_M6StringFM5rfindi2SC(&n_str_0, (char_)46, 0);
   if (dot_pos_0 < 0) {
      fx_copy_str(&n_str_0, &v_0);
   }
   else {
      FX_CALL(fx_substr(&n_str_0, dot_pos_0 + 1, 0, 1, 2, &v_0), _fx_cleanup);
   }
   int_ h_idx_0;
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &v_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_6;
   if (idx_0 >= 0) {
      v_6 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_1);
      int_ sz_0 = FX_ARR_SIZE(v_1, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_1 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_1);
            }
            else {
               fx_copy_str(&val0_0, &t_1);
            }
            fx_copy_str(&t_1, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_1);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_7 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_7);
         fx_copy_arr(&new_data_0, v_7);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_8 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      FX_FREE_STR(v_8);
      fx_copy_str(&v_0, v_8);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_6 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_9 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_9), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_9))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_1 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_1, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_2, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_3, 0), _fx_cleanup);
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_2, v_2, slit_3, v_3, slit_4 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_10 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_10), _fx_catch_1);
         fx_str_t slit_5 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_5, v_10, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_10) {
            _fx_free_LS(&v_10);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_4), _fx_cleanup);
      FX_THROW(&v_4, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_6, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_STR(&n_str_0);
   FX_FREE_STR(&v_0);
   FX_FREE_ARR(&v_1);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&v_3);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_4);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9get_scopeLN12Ast__scope_t1N14Ast__id_info_t(
   struct _fx_N14Ast__id_info_t* id_info_0,
   struct _fx_LN12Ast__scope_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = id_info_0->tag;
   if (tag_0 != 1) {
      if (tag_0 == 2) {
         FX_COPY_PTR(id_info_0->u.IdDVal.dv_scope, fx_result);
      }
      else if (tag_0 == 3) {
         _fx_R13Ast__deffun_t v_0 = {0};
         _fx_copy_R13Ast__deffun_t(&id_info_0->u.IdFun->data, &v_0);
         FX_COPY_PTR(v_0.df_scope, fx_result);
         _fx_free_R13Ast__deffun_t(&v_0);
      }
      else if (tag_0 == 4) {
         _fx_R13Ast__defexn_t v_1 = {0};
         _fx_copy_R13Ast__defexn_t(&id_info_0->u.IdExn->data, &v_1);
         FX_COPY_PTR(v_1.dexn_scope, fx_result);
         _fx_free_R13Ast__defexn_t(&v_1);
      }
      else if (tag_0 == 5) {
         _fx_R13Ast__deftyp_t v_2 = {0};
         _fx_copy_R13Ast__deftyp_t(&id_info_0->u.IdTyp->data, &v_2);
         FX_COPY_PTR(v_2.dt_scope, fx_result);
         _fx_free_R13Ast__deftyp_t(&v_2);
      }
      else if (tag_0 == 6) {
         _fx_R17Ast__defvariant_t v_3 = {0};
         _fx_copy_R17Ast__defvariant_t(&id_info_0->u.IdVariant->data, &v_3);
         FX_COPY_PTR(v_3.dvar_scope, fx_result);
         _fx_free_R17Ast__defvariant_t(&v_3);
      }
      else if (tag_0 == 7) {
         _fx_R19Ast__definterface_t v_4 = {0};
         _fx_copy_R19Ast__definterface_t(&id_info_0->u.IdInterface->data, &v_4);
         FX_COPY_PTR(v_4.di_scope, fx_result);
         _fx_free_R19Ast__definterface_t(&v_4);
      }
      else if (tag_0 != 8) {
         FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
      }
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14get_idinfo_locRM5loc_t1N14Ast__id_info_t(
   struct _fx_N14Ast__id_info_t* id_info_0,
   struct _fx_R10Ast__loc_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = id_info_0->tag;
   bool res_0;
   if (tag_0 == 1) {
      res_0 = true;
   }
   else if (tag_0 == 8) {
      res_0 = true;
   }
   else {
      res_0 = false;
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (res_0) {
      *fx_result = _fx_g10Ast__noloc; goto _fx_endmatch_0;
   }
   if (tag_0 == 2) {
      *fx_result = id_info_0->u.IdDVal.dv_loc; goto _fx_endmatch_0;
   }
   if (tag_0 == 3) {
      _fx_R13Ast__deffun_t v_0 = {0};
      _fx_copy_R13Ast__deffun_t(&id_info_0->u.IdFun->data, &v_0);
      *fx_result = v_0.df_loc;
      _fx_free_R13Ast__deffun_t(&v_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 4) {
      _fx_R13Ast__defexn_t v_1 = {0};
      _fx_copy_R13Ast__defexn_t(&id_info_0->u.IdExn->data, &v_1);
      *fx_result = v_1.dexn_loc;
      _fx_free_R13Ast__defexn_t(&v_1);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 5) {
      _fx_R13Ast__deftyp_t v_2 = {0};
      _fx_copy_R13Ast__deftyp_t(&id_info_0->u.IdTyp->data, &v_2);
      *fx_result = v_2.dt_loc;
      _fx_free_R13Ast__deftyp_t(&v_2);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 6) {
      _fx_R17Ast__defvariant_t v_3 = {0};
      _fx_copy_R17Ast__defvariant_t(&id_info_0->u.IdVariant->data, &v_3);
      *fx_result = v_3.dvar_loc;
      _fx_free_R17Ast__defvariant_t(&v_3);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 7) {
      _fx_R19Ast__definterface_t v_4 = {0};
      _fx_copy_R19Ast__definterface_t(&id_info_0->u.IdInterface->data, &v_4);
      *fx_result = v_4.di_loc;
      _fx_free_R19Ast__definterface_t(&v_4);
      goto _fx_endmatch_0;
   }
   *fx_result = _fx_g10Ast__noloc;

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14get_idinfo_typN10Ast__typ_t2N14Ast__id_info_tRM5loc_t(
   struct _fx_N14Ast__id_info_t* id_info_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = id_info_0->tag;
   if (tag_0 == 8) {
      FX_COPY_PTR(_fx_g14Ast__TypModule, fx_result);
   }
   else if (tag_0 == 2) {
      FX_COPY_PTR(id_info_0->u.IdDVal.dv_typ, fx_result);
   }
   else if (tag_0 == 3) {
      _fx_R13Ast__deffun_t v_0 = {0};
      _fx_copy_R13Ast__deffun_t(&id_info_0->u.IdFun->data, &v_0);
      FX_COPY_PTR(v_0.df_typ, fx_result);
      _fx_free_R13Ast__deffun_t(&v_0);
   }
   else if (tag_0 == 4) {
      _fx_R13Ast__defexn_t v_1 = {0};
      _fx_copy_R13Ast__defexn_t(&id_info_0->u.IdExn->data, &v_1);
      FX_COPY_PTR(v_1.dexn_typ, fx_result);
      _fx_free_R13Ast__defexn_t(&v_1);
   }
   else if (tag_0 == 5) {
      _fx_R13Ast__deftyp_t v_2 = {0};
      _fx_copy_R13Ast__deftyp_t(&id_info_0->u.IdTyp->data, &v_2);
      FX_COPY_PTR(v_2.dt_typ, fx_result);
      _fx_free_R13Ast__deftyp_t(&v_2);
   }
   else if (tag_0 == 6) {
      _fx_R17Ast__defvariant_t v_3 = {0};
      _fx_copy_R17Ast__defvariant_t(&id_info_0->u.IdVariant->data, &v_3);
      FX_COPY_PTR(v_3.dvar_alias, fx_result);
      _fx_free_R17Ast__defvariant_t(&v_3);
   }
   else if (tag_0 == 7) {
      _fx_R19Ast__definterface_t v_4 = {0};
      _fx_copy_R19Ast__definterface_t(&id_info_0->u.IdInterface->data, &v_4);
      FX_CALL(_fx_M3AstFM6TypAppN10Ast__typ_t2LN10Ast__typ_tRM4id_t(0, &v_4.di_name, fx_result), _fx_catch_0);

   _fx_catch_0: ;
      _fx_free_R19Ast__definterface_t(&v_4);
   }
   else if (tag_0 == 1) {
      fx_str_t fname_0 = {0};
      fx_str_t v_5 = {0};
      fx_str_t v_6 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_7 = {0};
      if (loc_0->m_idx >= 0) {
         int_ v_8 = loc_0->m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_8), _fx_catch_2);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_8))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_5, 0), _fx_catch_2);
      FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_6, 0), _fx_catch_2);
      fx_str_t slit_1 = FX_MAKE_STR(":");
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(": error: ast: attempt to request type of non-existing symbol");
      {
         const fx_str_t strs_0[] = { fname_0, slit_1, v_5, slit_2, v_6, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_catch_2);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_9 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_9), _fx_catch_1);
         fx_str_t slit_4 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_4, v_9, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_9) {
            _fx_free_LS(&v_9);
         }
      }
      FX_CHECK_EXN(_fx_catch_2);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_1, &v_7), _fx_catch_2);
      FX_THROW(&v_7, true, _fx_catch_2);

   _fx_catch_2: ;
      fx_free_exn(&v_7);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_6);
      FX_FREE_STR(&v_5);
      FX_FREE_STR(&fname_0);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM23get_idinfo_private_flagB1N14Ast__id_info_t(
   struct _fx_N14Ast__id_info_t* id_info_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = id_info_0->tag;
   if (tag_0 == 1) {
      *fx_result = true;
   }
   else if (tag_0 == 2) {
      _fx_R16Ast__val_flags_t* dv_flags_0 = &id_info_0->u.IdDVal.dv_flags;
      bool t_0;
      if (dv_flags_0->val_flag_private) {
         t_0 = true;
      }
      else {
         t_0 = dv_flags_0->val_flag_temp;
      }
      if (t_0) {
         *fx_result = true;
      }
      else {
         *fx_result = dv_flags_0->val_flag_tempref;
      }
   }
   else if (tag_0 == 3) {
      _fx_R13Ast__deffun_t v_0 = {0};
      _fx_copy_R13Ast__deffun_t(&id_info_0->u.IdFun->data, &v_0);
      *fx_result = v_0.df_flags.fun_flag_private;
      _fx_free_R13Ast__deffun_t(&v_0);
   }
   else if (tag_0 == 4) {
      *fx_result = false;
   }
   else if (tag_0 == 5) {
      *fx_result = false;
   }
   else if (tag_0 == 6) {
      *fx_result = false;
   }
   else if (tag_0 == 7) {
      *fx_result = false;
   }
   else if (tag_0 == 8) {
      *fx_result = true;
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11get_lit_typN10Ast__typ_t1N10Ast__lit_t(
   struct _fx_N10Ast__lit_t* l_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = l_0->tag;
   if (tag_0 == 1) {
      FX_COPY_PTR(_fx_g11Ast__TypInt, fx_result);
   }
   else if (tag_0 == 2) {
      FX_CALL(_fx_M3AstFM7TypSIntN10Ast__typ_t1i(l_0->u.LitSInt.t0, fx_result), _fx_catch_0);  _fx_catch_0: ;
   }
   else if (tag_0 == 3) {
      FX_CALL(_fx_M3AstFM7TypUIntN10Ast__typ_t1i(l_0->u.LitUInt.t0, fx_result), _fx_catch_1);  _fx_catch_1: ;
   }
   else if (tag_0 == 4) {
      FX_CALL(_fx_M3AstFM8TypFloatN10Ast__typ_t1i(l_0->u.LitFloat.t0, fx_result), _fx_catch_2);  _fx_catch_2: ;
   }
   else if (tag_0 == 5) {
      FX_COPY_PTR(_fx_g14Ast__TypString, fx_result);
   }
   else if (tag_0 == 6) {
      FX_COPY_PTR(_fx_g12Ast__TypChar, fx_result);
   }
   else if (tag_0 == 7) {
      FX_COPY_PTR(_fx_g12Ast__TypBool, fx_result);
   }
   else if (tag_0 == 8) {
      _fx_rNt6option1N10Ast__typ_t v_0 = 0;
      FX_CALL(_fx_make_rNt6option1N10Ast__typ_t(_fx_g11Ast__None4_, &v_0), _fx_catch_3);
      FX_CALL(_fx_M3AstFM6TypVarN10Ast__typ_t1rNt6option1N10Ast__typ_t(v_0, fx_result), _fx_catch_3);

   _fx_catch_3: ;
      if (v_0) {
         _fx_free_rNt6option1N10Ast__typ_t(&v_0);
      }
   }
   else if (tag_0 == 9) {
      FX_COPY_PTR(_fx_g16Ast__TypCPointer, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N10Ast__typ_t result_0 = 0;
   _fx_N10Ast__typ_t t_1 = 0;
   int fx_status = 0;
   FX_COPY_PTR(t_0, &t_1);
   for (;;) {
      _fx_N10Ast__typ_t t_2 = 0;
      _fx_Nt6option1N10Ast__typ_t v_0 = 0;
      _fx_Nt6option1N10Ast__typ_t v_1 = 0;
      _fx_Nt6option1N10Ast__typ_t v_2 = 0;
      _fx_Nt6option1N10Ast__typ_t v_3 = 0;
      FX_COPY_PTR(t_1, &t_2);
      int tag_0 = FX_REC_VARIANT_TAG(t_2);
      if (tag_0 == 1) {
         FX_COPY_PTR(t_2->u.TypVar->data, &v_0);
         if ((v_0 != 0) + 1 == 2) {
            if (FX_REC_VARIANT_TAG(v_0->u.Some) == 3) {
               _fx_free_N10Ast__typ_t(&result_0);
               FX_COPY_PTR(t_2, &result_0);
               FX_BREAK(_fx_catch_0);

            _fx_catch_0: ;
               goto _fx_endmatch_0;
            }
         }
      }
      if (tag_0 == 1) {
         FX_COPY_PTR(t_2->u.TypVar->data, &v_1);
         if ((v_1 != 0) + 1 == 2) {
            if (FX_REC_VARIANT_TAG(v_1->u.Some) == 2) {
               _fx_free_N10Ast__typ_t(&result_0);
               FX_COPY_PTR(t_2, &result_0);
               FX_BREAK(_fx_catch_1);

            _fx_catch_1: ;
               goto _fx_endmatch_0;
            }
         }
      }
      if (tag_0 == 1) {
         FX_COPY_PTR(t_2->u.TypVar->data, &v_2);
         if ((v_2 != 0) + 1 == 2) {
            if (FX_REC_VARIANT_TAG(v_2->u.Some) == 4) {
               _fx_free_N10Ast__typ_t(&result_0);
               FX_COPY_PTR(t_2, &result_0);
               FX_BREAK(_fx_catch_2);

            _fx_catch_2: ;
               goto _fx_endmatch_0;
            }
         }
      }
      if (tag_0 == 1) {
         FX_COPY_PTR(t_2->u.TypVar->data, &v_3);
         if ((v_3 != 0) + 1 == 2) {
            _fx_N10Ast__typ_t* t2_0 = &v_3->u.Some; _fx_free_N10Ast__typ_t(&t_1); FX_COPY_PTR(*t2_0, &t_1); goto _fx_endmatch_0;
         }
      }
      _fx_free_N10Ast__typ_t(&result_0);
      FX_COPY_PTR(t_2, &result_0);
      FX_BREAK(_fx_catch_3);

   _fx_catch_3: ;

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_4);

   _fx_catch_4: ;
      if (v_3) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_3);
      }
      if (v_2) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_2);
      }
      if (v_1) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_1);
      }
      if (v_0) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_0);
      }
      if (t_2) {
         _fx_free_N10Ast__typ_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(result_0, fx_result);

_fx_cleanup: ;
   if (result_0) {
      _fx_free_N10Ast__typ_t(&result_0);
   }
   if (t_1) {
      _fx_free_N10Ast__typ_t(&t_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9deref_typN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if (FX_REC_VARIANT_TAG(t_0) == 1) {
      _fx_N10Ast__typ_t v_0 = 0;
      _fx_N10Ast__typ_t result_0 = 0;
      _fx_N10Ast__typ_t t_1 = 0;
      _fx_N10Ast__typ_t root_0 = 0;
      FX_CALL(_fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(t_0, &v_0, 0), _fx_catch_3);
      FX_COPY_PTR(t_0, &t_1);
      FX_COPY_PTR(v_0, &root_0);
      for (;;) {
         _fx_N10Ast__typ_t t_2 = 0;
         _fx_N10Ast__typ_t root_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_2 = 0;
         FX_COPY_PTR(t_1, &t_2);
         FX_COPY_PTR(root_0, &root_1);
         if (FX_REC_VARIANT_TAG(t_2) == 1) {
            _fx_rNt6option1N10Ast__typ_t r_0 = t_2->u.TypVar;
            FX_COPY_PTR(r_0->data, &v_1);
            if ((v_1 != 0) + 1 == 2) {
               _fx_N10Ast__typ_t t1_0 = v_1->u.Some;
               if (FX_REC_VARIANT_TAG(t1_0) == 1) {
                  FX_COPY_PTR(t1_0->u.TypVar->data, &v_2);
                  if ((v_2 != 0) + 1 == 2) {
                     _fx_Nt6option1N10Ast__typ_t v_3 = 0;
                     FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(root_1, &v_3), _fx_catch_0);
                     _fx_Nt6option1N10Ast__typ_t* v_4 = &r_0->data;
                     _fx_free_Nt6option1N10Ast__typ_t(v_4);
                     FX_COPY_PTR(v_3, v_4);
                     _fx_free_N10Ast__typ_t(&t_1);
                     FX_COPY_PTR(t1_0, &t_1);
                     _fx_free_N10Ast__typ_t(&root_0);
                     FX_COPY_PTR(root_1, &root_0);

                  _fx_catch_0: ;
                     if (v_3) {
                        _fx_free_Nt6option1N10Ast__typ_t(&v_3);
                     }
                     goto _fx_endmatch_0;
                  }
               }
            }
         }
         _fx_free_N10Ast__typ_t(&result_0);
         FX_COPY_PTR(root_1, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         if (v_2) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_2);
         }
         if (v_1) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_1);
         }
         if (root_1) {
            _fx_free_N10Ast__typ_t(&root_1);
         }
         if (t_2) {
            _fx_free_N10Ast__typ_t(&t_2);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_3);
      }
      FX_COPY_PTR(result_0, fx_result);

   _fx_catch_3: ;
      if (root_0) {
         _fx_free_N10Ast__typ_t(&root_0);
      }
      if (t_1) {
         _fx_free_N10Ast__typ_t(&t_1);
      }
      if (result_0) {
         _fx_free_N10Ast__typ_t(&result_0);
      }
      if (v_0) {
         _fx_free_N10Ast__typ_t(&v_0);
      }
   }
   else {
      FX_COPY_PTR(t_0, fx_result);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13is_typ_scalarB1N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t* t_0, bool* fx_result, void* fx_fv)
{
   _fx_N10Ast__typ_t t_1 = 0;
   int fx_status = 0;
   bool result_0 = 0;
   FX_COPY_PTR(t_0, &t_1);
   for (;;) {
      _fx_N10Ast__typ_t t_2 = 0;
      _fx_Nt6option1N10Ast__typ_t v_0 = 0;
      FX_COPY_PTR(t_1, &t_2);
      int tag_0 = FX_REC_VARIANT_TAG(t_2);
      bool res_0;
      if (tag_0 == 5) {
         res_0 = true;
      }
      else if (tag_0 == 6) {
         res_0 = true;
      }
      else if (tag_0 == 7) {
         res_0 = true;
      }
      else if (tag_0 == 9) {
         res_0 = true;
      }
      else if (tag_0 == 12) {
         res_0 = true;
      }
      else if (tag_0 == 11) {
         res_0 = true;
      }
      else {
         res_0 = false;
      }
      FX_CHECK_EXN(_fx_catch_2);
      if (res_0) {
         result_0 = true; FX_BREAK(_fx_catch_0);  _fx_catch_0: ; goto _fx_endmatch_0;
      }
      if (tag_0 == 1) {
         FX_COPY_PTR(t_2->u.TypVar->data, &v_0);
         if ((v_0 != 0) + 1 == 2) {
            _fx_N10Ast__typ_t* t_3 = &v_0->u.Some; _fx_free_N10Ast__typ_t(&t_1); FX_COPY_PTR(*t_3, &t_1); goto _fx_endmatch_0;
         }
      }
      result_0 = false;
      FX_BREAK(_fx_catch_1);

   _fx_catch_1: ;

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_2);

   _fx_catch_2: ;
      if (v_0) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_0);
      }
      if (t_2) {
         _fx_free_N10Ast__typ_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   *fx_result = result_0;

_fx_cleanup: ;
   if (t_1) {
      _fx_free_N10Ast__typ_t(&t_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM20get_numeric_typ_sizei2N10Ast__typ_tB(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   bool allow_tuples_0,
   int_* fx_result,
   void* fx_fv)
{
   _fx_N10Ast__typ_t t_1 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int_ result_0 = 0;
   FX_COPY_PTR(t_0, &t_1);
   bool allow_tuples_1 = allow_tuples_0;
   for (;;) {
      _fx_N10Ast__typ_t t_2 = 0;
      _fx_N10Ast__typ_t v_0 = 0;
      _fx_Nt6option1N10Ast__typ_t v_1 = 0;
      FX_COPY_PTR(t_1, &t_2);
      bool allow_tuples_2 = allow_tuples_1;
      if (FX_REC_VARIANT_TAG(t_2) == 1) {
         _fx_N10Ast__typ_t v_2 = 0;
         _fx_N10Ast__typ_t result_1 = 0;
         _fx_N10Ast__typ_t t_3 = 0;
         _fx_N10Ast__typ_t root_0 = 0;
         FX_CALL(_fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(t_2, &v_2, 0), _fx_catch_3);
         FX_COPY_PTR(t_2, &t_3);
         FX_COPY_PTR(v_2, &root_0);
         for (;;) {
            _fx_N10Ast__typ_t t_4 = 0;
            _fx_N10Ast__typ_t root_1 = 0;
            _fx_Nt6option1N10Ast__typ_t v_3 = 0;
            _fx_Nt6option1N10Ast__typ_t v_4 = 0;
            FX_COPY_PTR(t_3, &t_4);
            FX_COPY_PTR(root_0, &root_1);
            if (FX_REC_VARIANT_TAG(t_4) == 1) {
               _fx_rNt6option1N10Ast__typ_t r_0 = t_4->u.TypVar;
               FX_COPY_PTR(r_0->data, &v_3);
               if ((v_3 != 0) + 1 == 2) {
                  _fx_N10Ast__typ_t t1_0 = v_3->u.Some;
                  if (FX_REC_VARIANT_TAG(t1_0) == 1) {
                     FX_COPY_PTR(t1_0->u.TypVar->data, &v_4);
                     if ((v_4 != 0) + 1 == 2) {
                        _fx_Nt6option1N10Ast__typ_t v_5 = 0;
                        FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(root_1, &v_5), _fx_catch_0);
                        _fx_Nt6option1N10Ast__typ_t* v_6 = &r_0->data;
                        _fx_free_Nt6option1N10Ast__typ_t(v_6);
                        FX_COPY_PTR(v_5, v_6);
                        _fx_free_N10Ast__typ_t(&t_3);
                        FX_COPY_PTR(t1_0, &t_3);
                        _fx_free_N10Ast__typ_t(&root_0);
                        FX_COPY_PTR(root_1, &root_0);

                     _fx_catch_0: ;
                        if (v_5) {
                           _fx_free_Nt6option1N10Ast__typ_t(&v_5);
                        }
                        goto _fx_endmatch_0;
                     }
                  }
               }
            }
            _fx_free_N10Ast__typ_t(&result_1);
            FX_COPY_PTR(root_1, &result_1);
            FX_BREAK(_fx_catch_1);

         _fx_catch_1: ;

         _fx_endmatch_0: ;
            FX_CHECK_EXN(_fx_catch_2);

         _fx_catch_2: ;
            if (v_4) {
               _fx_free_Nt6option1N10Ast__typ_t(&v_4);
            }
            if (v_3) {
               _fx_free_Nt6option1N10Ast__typ_t(&v_3);
            }
            if (root_1) {
               _fx_free_N10Ast__typ_t(&root_1);
            }
            if (t_4) {
               _fx_free_N10Ast__typ_t(&t_4);
            }
            FX_CHECK_BREAK();
            FX_CHECK_EXN(_fx_catch_3);
         }
         FX_COPY_PTR(result_1, &v_0);

      _fx_catch_3: ;
         if (root_0) {
            _fx_free_N10Ast__typ_t(&root_0);
         }
         if (t_3) {
            _fx_free_N10Ast__typ_t(&t_3);
         }
         if (result_1) {
            _fx_free_N10Ast__typ_t(&result_1);
         }
         if (v_2) {
            _fx_free_N10Ast__typ_t(&v_2);
         }
      }
      else {
         FX_COPY_PTR(t_2, &v_0);
      }
      FX_CHECK_EXN(_fx_catch_14);
      int tag_0 = FX_REC_VARIANT_TAG(v_0);
      if (tag_0 == 5) {
         result_0 = 8; FX_BREAK(_fx_catch_4);  _fx_catch_4: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 8) {
         result_0 = -1; FX_BREAK(_fx_catch_5);  _fx_catch_5: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 6) {
         result_0 = v_0->u.TypSInt / 8; FX_BREAK(_fx_catch_6);  _fx_catch_6: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 7) {
         result_0 = v_0->u.TypUInt / 8; FX_BREAK(_fx_catch_7);  _fx_catch_7: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 9) {
         result_0 = v_0->u.TypFloat / 8; FX_BREAK(_fx_catch_8);  _fx_catch_8: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 12) {
         result_0 = 1; FX_BREAK(_fx_catch_9);  _fx_catch_9: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 11) {
         result_0 = 4; FX_BREAK(_fx_catch_10);  _fx_catch_10: ; goto _fx_endmatch_1;
      }
      if (tag_0 == 1) {
         FX_COPY_PTR(v_0->u.TypVar->data, &v_1);
         if ((v_1 != 0) + 1 == 2) {
            _fx_N10Ast__typ_t* t_5 = &v_1->u.Some;
            _fx_free_N10Ast__typ_t(&t_1);
            FX_COPY_PTR(*t_5, &t_1);
            allow_tuples_1 = allow_tuples_2;
            goto _fx_endmatch_1;
         }
      }
      if (tag_0 == 17) {
         _fx_LN10Ast__typ_t tl_0 = 0;
         if (!allow_tuples_2) {
            result_0 = -1; FX_BREAK(_fx_catch_12);
         }
         else {
            int_ __fold_result___0 = 0;
            FX_COPY_PTR(v_0->u.TypTuple, &tl_0);
            _fx_LN10Ast__typ_t lst_0 = tl_0;
            for (; lst_0; lst_0 = lst_0->tl) {
               _fx_N10Ast__typ_t t_6 = lst_0->hd;
               int_ sz_0 = __fold_result___0;
               int_ szj_0;
               FX_CALL(_fx_M3AstFM20get_numeric_typ_sizei2N10Ast__typ_tB(t_6, true, &szj_0, 0), _fx_catch_11);
               bool t_7;
               if (szj_0 < 0) {
                  t_7 = true;
               }
               else {
                  t_7 = sz_0 < 0;
               }
               int_ t_8;
               if (t_7) {
                  t_8 = -1;
               }
               else {
                  t_8 = sz_0 + szj_0;
               }
               __fold_result___0 = t_8;

            _fx_catch_11: ;
               FX_CHECK_EXN(_fx_catch_12);
            }
            result_0 = __fold_result___0;
            FX_BREAK(_fx_catch_12);
         }

      _fx_catch_12: ;
         if (tl_0) {
            _fx_free_LN10Ast__typ_t(&tl_0);
         }
         goto _fx_endmatch_1;
      }
      result_0 = -1;
      FX_BREAK(_fx_catch_13);

   _fx_catch_13: ;

   _fx_endmatch_1: ;
      FX_CHECK_EXN(_fx_catch_14);

   _fx_catch_14: ;
      if (v_1) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_1);
      }
      if (v_0) {
         _fx_free_N10Ast__typ_t(&v_0);
      }
      if (t_2) {
         _fx_free_N10Ast__typ_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   *fx_result = result_0;

_fx_cleanup: ;
   if (t_1) {
      _fx_free_N10Ast__typ_t(&t_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1N15Ast__for_make_t(struct _fx_N15Ast__for_make_t* fm_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = fm_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_0 = FX_MAKE_STR("ForMakeNone"); fx_copy_str(&slit_0, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_1 = FX_MAKE_STR("ForMakeArray"); fx_copy_str(&slit_1, fx_result);
   }
   else if (tag_0 == 3) {
      fx_str_t slit_2 = FX_MAKE_STR("ForMakeList"); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 5) {
      fx_str_t slit_3 = FX_MAKE_STR("ForMakeTuple"); fx_copy_str(&slit_3, fx_result);
   }
   else {
      fx_str_t slit_4 = FX_MAKE_STR("ForMake???"); fx_copy_str(&slit_4, fx_result);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1N12Ast__cmpop_t(struct _fx_N12Ast__cmpop_t* c_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = c_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_0 = FX_MAKE_STR("=="); fx_copy_str(&slit_0, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_1 = FX_MAKE_STR("!="); fx_copy_str(&slit_1, fx_result);
   }
   else if (tag_0 == 3) {
      fx_str_t slit_2 = FX_MAKE_STR("<"); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 4) {
      fx_str_t slit_3 = FX_MAKE_STR("<="); fx_copy_str(&slit_3, fx_result);
   }
   else if (tag_0 == 5) {
      fx_str_t slit_4 = FX_MAKE_STR(">="); fx_copy_str(&slit_4, fx_result);
   }
   else if (tag_0 == 6) {
      fx_str_t slit_5 = FX_MAKE_STR(">"); fx_copy_str(&slit_5, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1N13Ast__binary_t(
   struct _fx_N13Ast__binary_t_data_t* bop_0,
   fx_str_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(bop_0);
   if (tag_0 == 1) {
      fx_str_t slit_0 = FX_MAKE_STR("+"); fx_copy_str(&slit_0, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_1 = FX_MAKE_STR("-"); fx_copy_str(&slit_1, fx_result);
   }
   else if (tag_0 == 3) {
      fx_str_t slit_2 = FX_MAKE_STR("*"); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 4) {
      fx_str_t slit_3 = FX_MAKE_STR("/"); fx_copy_str(&slit_3, fx_result);
   }
   else if (tag_0 == 5) {
      fx_str_t slit_4 = FX_MAKE_STR("\\"); fx_copy_str(&slit_4, fx_result);
   }
   else if (tag_0 == 6) {
      fx_str_t slit_5 = FX_MAKE_STR("%"); fx_copy_str(&slit_5, fx_result);
   }
   else if (tag_0 == 7) {
      fx_str_t slit_6 = FX_MAKE_STR("**"); fx_copy_str(&slit_6, fx_result);
   }
   else if (tag_0 == 10) {
      fx_str_t slit_7 = FX_MAKE_STR(".+"); fx_copy_str(&slit_7, fx_result);
   }
   else if (tag_0 == 11) {
      fx_str_t slit_8 = FX_MAKE_STR(".-"); fx_copy_str(&slit_8, fx_result);
   }
   else if (tag_0 == 12) {
      fx_str_t slit_9 = FX_MAKE_STR(".*"); fx_copy_str(&slit_9, fx_result);
   }
   else if (tag_0 == 13) {
      fx_str_t slit_10 = FX_MAKE_STR("./"); fx_copy_str(&slit_10, fx_result);
   }
   else if (tag_0 == 14) {
      fx_str_t slit_11 = FX_MAKE_STR(".%"); fx_copy_str(&slit_11, fx_result);
   }
   else if (tag_0 == 15) {
      fx_str_t slit_12 = FX_MAKE_STR(".**"); fx_copy_str(&slit_12, fx_result);
   }
   else if (tag_0 == 8) {
      fx_str_t slit_13 = FX_MAKE_STR("<<"); fx_copy_str(&slit_13, fx_result);
   }
   else if (tag_0 == 9) {
      fx_str_t slit_14 = FX_MAKE_STR(">>"); fx_copy_str(&slit_14, fx_result);
   }
   else if (tag_0 == 16) {
      fx_str_t slit_15 = FX_MAKE_STR("&"); fx_copy_str(&slit_15, fx_result);
   }
   else if (tag_0 == 17) {
      fx_str_t slit_16 = FX_MAKE_STR("&&"); fx_copy_str(&slit_16, fx_result);
   }
   else if (tag_0 == 18) {
      fx_str_t slit_17 = FX_MAKE_STR("|"); fx_copy_str(&slit_17, fx_result);
   }
   else if (tag_0 == 19) {
      fx_str_t slit_18 = FX_MAKE_STR("||"); fx_copy_str(&slit_18, fx_result);
   }
   else if (tag_0 == 20) {
      fx_str_t slit_19 = FX_MAKE_STR("^"); fx_copy_str(&slit_19, fx_result);
   }
   else if (tag_0 == 23) {
      fx_str_t slit_20 = FX_MAKE_STR("<=>"); fx_copy_str(&slit_20, fx_result);
   }
   else if (tag_0 == 24) {
      fx_str_t slit_21 = FX_MAKE_STR(".<=>"); fx_copy_str(&slit_21, fx_result);
   }
   else if (tag_0 == 25) {
      fx_str_t slit_22 = FX_MAKE_STR("==="); fx_copy_str(&slit_22, fx_result);
   }
   else if (tag_0 == 21) {
      int tag_1 = bop_0->u.OpCmp.tag;
      if (tag_1 == 1) {
         fx_str_t slit_23 = FX_MAKE_STR("=="); fx_copy_str(&slit_23, fx_result);
      }
      else if (tag_1 == 2) {
         fx_str_t slit_24 = FX_MAKE_STR("!="); fx_copy_str(&slit_24, fx_result);
      }
      else if (tag_1 == 3) {
         fx_str_t slit_25 = FX_MAKE_STR("<"); fx_copy_str(&slit_25, fx_result);
      }
      else if (tag_1 == 4) {
         fx_str_t slit_26 = FX_MAKE_STR("<="); fx_copy_str(&slit_26, fx_result);
      }
      else if (tag_1 == 5) {
         fx_str_t slit_27 = FX_MAKE_STR(">="); fx_copy_str(&slit_27, fx_result);
      }
      else if (tag_1 == 6) {
         fx_str_t slit_28 = FX_MAKE_STR(">"); fx_copy_str(&slit_28, fx_result);
      }
      else {
         FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_0);
      }
      FX_CHECK_EXN(_fx_catch_0);

   _fx_catch_0: ;
   }
   else if (tag_0 == 22) {
      fx_str_t v_0 = {0};
      int tag_2 = bop_0->u.OpDotCmp.tag;
      if (tag_2 == 1) {
         fx_str_t slit_29 = FX_MAKE_STR("=="); fx_copy_str(&slit_29, &v_0);
      }
      else if (tag_2 == 2) {
         fx_str_t slit_30 = FX_MAKE_STR("!="); fx_copy_str(&slit_30, &v_0);
      }
      else if (tag_2 == 3) {
         fx_str_t slit_31 = FX_MAKE_STR("<"); fx_copy_str(&slit_31, &v_0);
      }
      else if (tag_2 == 4) {
         fx_str_t slit_32 = FX_MAKE_STR("<="); fx_copy_str(&slit_32, &v_0);
      }
      else if (tag_2 == 5) {
         fx_str_t slit_33 = FX_MAKE_STR(">="); fx_copy_str(&slit_33, &v_0);
      }
      else if (tag_2 == 6) {
         fx_str_t slit_34 = FX_MAKE_STR(">"); fx_copy_str(&slit_34, &v_0);
      }
      else {
         FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_1);
      }
      FX_CHECK_EXN(_fx_catch_1);
      fx_str_t slit_35 = FX_MAKE_STR(".");
      {
         const fx_str_t strs_0[] = { slit_35, v_0 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, fx_result), _fx_catch_1);
      }

   _fx_catch_1: ;
      FX_FREE_STR(&v_0);
   }
   else if (tag_0 == 26) {
      fx_str_t slit_36 = FX_MAKE_STR("::"); fx_copy_str(&slit_36, fx_result);
   }
   else if (tag_0 == 27) {
      fx_str_t v_1 = {0};
      FX_CALL(_fx_M3AstFM6stringS1N13Ast__binary_t(bop_0->u.OpAugBinary, &v_1, 0), _fx_catch_2);
      fx_str_t slit_37 = FX_MAKE_STR("=");
      {
         const fx_str_t strs_1[] = { v_1, slit_37 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_1, 2, fx_result), _fx_catch_2);
      }

   _fx_catch_2: ;
      FX_FREE_STR(&v_1);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1N12Ast__unary_t(struct _fx_N12Ast__unary_t* uop_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = uop_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_0 = FX_MAKE_STR("+"); fx_copy_str(&slit_0, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_1 = FX_MAKE_STR("-"); fx_copy_str(&slit_1, fx_result);
   }
   else if (tag_0 == 3) {
      fx_str_t slit_2 = FX_MAKE_STR(".-"); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 4) {
      fx_str_t slit_3 = FX_MAKE_STR("~"); fx_copy_str(&slit_3, fx_result);
   }
   else if (tag_0 == 5) {
      fx_str_t slit_4 = FX_MAKE_STR("!"); fx_copy_str(&slit_4, fx_result);
   }
   else if (tag_0 == 8) {
      fx_str_t slit_5 = FX_MAKE_STR("\\"); fx_copy_str(&slit_5, fx_result);
   }
   else if (tag_0 == 6) {
      fx_str_t slit_6 = FX_MAKE_STR("REF"); fx_copy_str(&slit_6, fx_result);
   }
   else if (tag_0 == 7) {
      fx_str_t slit_7 = FX_MAKE_STR("*"); fx_copy_str(&slit_7, fx_result);
   }
   else if (tag_0 == 9) {
      fx_str_t slit_8 = FX_MAKE_STR("\'"); fx_copy_str(&slit_8, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6stringS1N13Ast__intrin_t(struct _fx_N13Ast__intrin_t* iop_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = iop_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_0 = FX_MAKE_STR("__intrin_pop_exn__"); fx_copy_str(&slit_0, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_1 = FX_MAKE_STR("__intrin_variant_tag__"); fx_copy_str(&slit_1, fx_result);
   }
   else if (tag_0 == 3) {
      fx_str_t slit_2 = FX_MAKE_STR("__intrin_variant_case__"); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 4) {
      fx_str_t slit_3 = FX_MAKE_STR("__intrin_query_iface__"); fx_copy_str(&slit_3, fx_result);
   }
   else if (tag_0 == 5) {
      fx_str_t slit_4 = FX_MAKE_STR("__intrin_get_object__"); fx_copy_str(&slit_4, fx_result);
   }
   else if (tag_0 == 6) {
      fx_str_t slit_5 = FX_MAKE_STR("__intrin_hd__"); fx_copy_str(&slit_5, fx_result);
   }
   else if (tag_0 == 7) {
      fx_str_t slit_6 = FX_MAKE_STR("__intrin_tl__"); fx_copy_str(&slit_6, fx_result);
   }
   else if (tag_0 == 8) {
      fx_str_t slit_7 = FX_MAKE_STR("__intrin_str_concat__"); fx_copy_str(&slit_7, fx_result);
   }
   else if (tag_0 == 9) {
      fx_str_t slit_8 = FX_MAKE_STR("__intrin_size__"); fx_copy_str(&slit_8, fx_result);
   }
   else if (tag_0 == 10) {
      fx_str_t slit_9 = FX_MAKE_STR("__intrin_check_idx__"); fx_copy_str(&slit_9, fx_result);
   }
   else if (tag_0 == 11) {
      fx_str_t slit_10 = FX_MAKE_STR("__intrin_check_range__"); fx_copy_str(&slit_10, fx_result);
   }
   else if (tag_0 == 12) {
      fx_str_t slit_11 = FX_MAKE_STR("__intrin_make_fp_by_fcv__"); fx_copy_str(&slit_11, fx_result);
   }
   else if (tag_0 == 13) {
      fx_str_t slit_12 = FX_MAKE_STR("__intrin_gemm__"); fx_copy_str(&slit_12, fx_result);
   }
   else if (tag_0 == 16) {
      fx_str_t v_0 = {0};
      _fx_R9Ast__id_t* f_0 = &iop_0->u.IntrinMath;
      bool t_0;
      if ((bool)((f_0->m == _fx_g9Ast__noid.m) & (f_0->i == _fx_g9Ast__noid.i))) {
         t_0 = (bool)((f_0->m == 0) | (f_0->j == _fx_g9Ast__noid.j));
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         fx_str_t slit_13 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_13, &v_0);
      }
      else {
         int_ v_1 = f_0->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_1), _fx_catch_0);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_1), &v_0);
      }
      fx_str_t slit_14 = FX_MAKE_STR("__intrin_");
      fx_str_t slit_15 = FX_MAKE_STR("__");
      {
         const fx_str_t strs_0[] = { slit_14, v_0, slit_15 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, fx_result), _fx_catch_0);
      }

   _fx_catch_0: ;
      FX_FREE_STR(&v_0);
   }
   else if (tag_0 == 17) {
      fx_str_t v_2 = {0};
      int tag_1 = iop_0->u.IntrinSaturate.tag;
      if (tag_1 == 2) {
         fx_str_t slit_16 = FX_MAKE_STR("int8"); fx_copy_str(&slit_16, &v_2);
      }
      else if (tag_1 == 1) {
         fx_str_t slit_17 = FX_MAKE_STR("uint8"); fx_copy_str(&slit_17, &v_2);
      }
      else if (tag_1 == 4) {
         fx_str_t slit_18 = FX_MAKE_STR("int16"); fx_copy_str(&slit_18, &v_2);
      }
      else if (tag_1 == 3) {
         fx_str_t slit_19 = FX_MAKE_STR("uint16"); fx_copy_str(&slit_19, &v_2);
      }
      else {
         FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_1);
      }
      FX_CHECK_EXN(_fx_catch_1);
      fx_str_t slit_20 = FX_MAKE_STR("__intrin_sat_");
      fx_str_t slit_21 = FX_MAKE_STR("__");
      {
         const fx_str_t strs_1[] = { slit_20, v_2, slit_21 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_1, 3, fx_result), _fx_catch_1);
      }

   _fx_catch_1: ;
      FX_FREE_STR(&v_2);
   }
   else if (tag_0 == 14) {
      fx_str_t slit_22 = FX_MAKE_STR("__intrin_get_slice__"); fx_copy_str(&slit_22, fx_result);
   }
   else if (tag_0 == 15) {
      fx_str_t slit_23 = FX_MAKE_STR("__intrin_access_slice__"); fx_copy_str(&slit_23, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10border2strS2N13Ast__border_tB(
   struct _fx_N13Ast__border_t* border_0,
   bool f_0,
   fx_str_t* fx_result,
   void* fx_fv)
{
   fx_str_t pt_0 = {0};
   int fx_status = 0;
   if (f_0) {
      fx_str_t slit_0 = FX_MAKE_STR("."); fx_copy_str(&slit_0, &pt_0);
   }
   else {
      fx_str_t slit_1 = FX_MAKE_STR(""); fx_copy_str(&slit_1, &pt_0);
   }
   int tag_0 = border_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_2 = FX_MAKE_STR(""); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_3 = FX_MAKE_STR(".clip");
      {
         const fx_str_t strs_0[] = { pt_0, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, fx_result), _fx_catch_0);
      }

   _fx_catch_0: ;
   }
   else if (tag_0 == 3) {
      fx_str_t slit_4 = FX_MAKE_STR(".wrap");
      {
         const fx_str_t strs_1[] = { pt_0, slit_4 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_1, 2, fx_result), _fx_catch_1);
      }

   _fx_catch_1: ;
   }
   else if (tag_0 == 4) {
      fx_str_t slit_5 = FX_MAKE_STR(".zero");
      {
         const fx_str_t strs_2[] = { pt_0, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_2, 2, fx_result), _fx_catch_2);
      }

   _fx_catch_2: ;
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_STR(&pt_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10interp2strS2N18Ast__interpolate_tB(
   struct _fx_N18Ast__interpolate_t* interp_0,
   bool f_0,
   fx_str_t* fx_result,
   void* fx_fv)
{
   fx_str_t pt_0 = {0};
   int fx_status = 0;
   if (f_0) {
      fx_str_t slit_0 = FX_MAKE_STR("."); fx_copy_str(&slit_0, &pt_0);
   }
   else {
      fx_str_t slit_1 = FX_MAKE_STR(""); fx_copy_str(&slit_1, &pt_0);
   }
   int tag_0 = interp_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_2 = FX_MAKE_STR(""); fx_copy_str(&slit_2, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_3 = FX_MAKE_STR("linear");
      {
         const fx_str_t strs_0[] = { pt_0, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, fx_result), _fx_catch_0);
      }

   _fx_catch_0: ;
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_STR(&pt_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_op_aposRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__apos__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__apos__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_addRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__add__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__add__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_subRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__sub__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__sub__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_mulRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__mul__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__mul__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_divRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__div__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__div__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_op_rdivRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__rdiv__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__rdiv__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_modRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__mod__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__mod__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_powRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__pow__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__pow__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_addRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_add__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_add__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_subRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_sub__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_sub__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_mulRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_mul__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_mul__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_divRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_div__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_div__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_modRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_mod__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_mod__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_powRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_pow__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_pow__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_shlRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__shl__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__shl__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_shrRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__shr__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__shr__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_bit_andRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__bit_and__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__bit_and__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_bit_orRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__bit_or__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__bit_or__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_bit_xorRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__bit_xor__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__bit_xor__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_op_cmpRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__cmp__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__cmp__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_op_eqRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__eq__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__eq__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_op_neRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__ne__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__ne__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_op_ltRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__lt__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__lt__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_op_gtRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__gt__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__gt__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_op_leRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__le__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__le__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_op_geRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__ge__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__ge__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_dot_cmpRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_cmp__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_cmp__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_dot_eqRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_eq__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_eq__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_dot_neRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_ne__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_ne__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_dot_ltRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_lt__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_lt__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_dot_gtRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_gt__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_gt__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_dot_leRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_le__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_le__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_dot_geRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_ge__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_ge__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_op_sameRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__same__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__same__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_op_plusRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__plus__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__plus__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_op_negateRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__negate__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__negate__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18fname_op_dot_minusRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__dot_minus__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__dot_minus__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_bit_notRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__bit_not__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__bit_not__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_addRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_add__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_add__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_subRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_sub__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_sub__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_mulRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_mul__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_mul__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_divRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_div__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_div__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_modRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_mod__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_mod__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM20fname_op_aug_bit_andRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_bit_and__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_bit_and__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM19fname_op_aug_bit_orRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_bit_or__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_bit_or__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM20fname_op_aug_bit_xorRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_bit_xor__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_bit_xor__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM20fname_op_aug_dot_mulRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_dot_mul__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_dot_mul__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM20fname_op_aug_dot_divRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_dot_div__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_dot_div__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM20fname_op_aug_dot_modRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_dot_mod__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_dot_mod__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_shlRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_shl__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_shl__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16fname_op_aug_shrRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__aug_shr__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__aug_shr__");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_to_intRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("int");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("int");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_to_longRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("long");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("long");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14fname_to_uint8RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("uint8");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("uint8");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_to_int8RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("int8");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("int8");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_to_uint16RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("uint16");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("uint16");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14fname_to_int16RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("int16");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("int16");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_to_uint32RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("uint32");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("uint32");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14fname_to_int32RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("int32");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("int32");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_to_uint64RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("uint64");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("uint64");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14fname_to_int64RM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("int64");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("int64");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14fname_to_floatRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("float");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("float");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15fname_to_doubleRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("double");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("double");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13fname_to_boolRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("bool");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("bool");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12fname_stringRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("string");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("string");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM11fname_printRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("print");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("print");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10fname_reprRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("repr");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("repr");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM10fname_hashRM4id_t0(struct _fx_R9Ast__id_t* fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_str_t fname_0 = {0};
   fx_str_t v_1 = {0};
   fx_str_t v_2 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_3 = {0};
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("hash");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_4;
   if (idx_0 >= 0) {
      v_4 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_5);
         fx_copy_arr(&new_data_0, v_5);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("hash");
      FX_FREE_STR(v_6);
      fx_copy_str(&slit_1, v_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_4 = n0_0;
   }
   else {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_7 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_cleanup);
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(":");
      fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
      {
         const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

      _fx_catch_1: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_cleanup);
      FX_THROW(&v_3, true, _fx_cleanup);
   }
   _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
   *fx_result = rec_0;

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_1);
   FX_FREE_STR(&v_2);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_3);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM21binary_try_remove_dotN13Ast__binary_t1N13Ast__binary_t(
   struct _fx_N13Ast__binary_t_data_t* bop_0,
   struct _fx_N13Ast__binary_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = FX_REC_VARIANT_TAG(bop_0);
   if (tag_0 == 12) {
      FX_COPY_PTR(_fx_g10Ast__OpMul, fx_result);
   }
   else if (tag_0 == 13) {
      FX_COPY_PTR(_fx_g10Ast__OpDiv, fx_result);
   }
   else if (tag_0 == 14) {
      FX_COPY_PTR(_fx_g10Ast__OpMod, fx_result);
   }
   else if (tag_0 == 15) {
      FX_COPY_PTR(_fx_g10Ast__OpPow, fx_result);
   }
   else if (tag_0 == 24) {
      FX_COPY_PTR(_fx_g16Ast__OpSpaceship, fx_result);
   }
   else if (tag_0 == 22) {
      FX_CALL(_fx_M3AstFM5OpCmpN13Ast__binary_t1N12Ast__cmpop_t(&bop_0->u.OpDotCmp, fx_result), _fx_catch_0);  _fx_catch_0: ;
   }
   else {
      FX_COPY_PTR(bop_0, fx_result);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16get_binary_fnameRM4id_t2N13Ast__binary_tRM5loc_t(
   struct _fx_N13Ast__binary_t_data_t* bop_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = FX_REC_VARIANT_TAG(bop_0);
   if (tag_0 == 1) {
      fx_arr_t v_0 = {0};
      fx_arr_t old_data_0 = {0};
      fx_str_t val0_0 = {0};
      fx_arr_t new_data_0 = {0};
      fx_exn_t v_1 = {0};
      int_ h_idx_0;
      fx_str_t slit_0 = FX_MAKE_STR("__add__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_catch_1);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_1);
      int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
      int_ v_2;
      if (idx_0 >= 0) {
         v_2 = idx_0;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
         int_ sz_0 = FX_ARR_SIZE(v_0, 0);
         int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
         if (sz_0 <= n0_0) {
            int_ n1_0 = fx_maxi(n0_0, 128) * 2;
            fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
            fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
            fx_str_t* dstptr_0 = 0;
            {
               const int_ shape_0[] = { n1_0 };
               FX_CALL(
                  fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
                  _fx_catch_1);
            }
            dstptr_0 = (fx_str_t*)new_data_0.data;
            for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
               fx_str_t t_0 = {0};
               if (i_0 < n0_0) {
                  FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0);
                  fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
               }
               else {
                  fx_copy_str(&val0_0, &t_0);
               }
               fx_copy_str(&t_0, dstptr_0);

            _fx_catch_0: ;
               FX_FREE_STR(&t_0);
               FX_CHECK_EXN(_fx_catch_1);
            }
            fx_arr_t* v_3 = &_fx_g14Ast__all_names->u.t.t1;
            FX_FREE_ARR(v_3);
            fx_copy_arr(&new_data_0, v_3);
         }
         _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_catch_1);
         fx_str_t* v_4 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
         fx_str_t slit_1 = FX_MAKE_STR("__add__");
         FX_FREE_STR(v_4);
         fx_copy_str(&slit_1, v_4);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_1);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
         v_2 = n0_0;
      }
      else {
         fx_str_t slit_2 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_2, &v_1, 0), _fx_catch_1);
         FX_THROW(&v_1, false, _fx_catch_1);
      }
      _fx_R9Ast__id_t rec_0 = { 0, v_2, 0 };
      *fx_result = rec_0;

   _fx_catch_1: ;
      fx_free_exn(&v_1);
      FX_FREE_ARR(&new_data_0);
      FX_FREE_STR(&val0_0);
      FX_FREE_ARR(&old_data_0);
      FX_FREE_ARR(&v_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 2) {
      fx_exn_t v_5 = {0};
      int_ h_idx_1;
      fx_str_t slit_3 = FX_MAKE_STR("__sub__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_3, &h_idx_1, 0), _fx_catch_2);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_catch_2);
      int_ idx_1 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data;
      int_ v_6;
      if (idx_1 >= 0) {
         v_6 = idx_1;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         int_ idx_2;
         fx_str_t slit_4 = FX_MAKE_STR("__sub__");
         FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_4, &idx_2, 0), _fx_catch_2);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_catch_2);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data = idx_2;
         v_6 = idx_2;
      }
      else {
         fx_str_t slit_5 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_5, &v_5, 0), _fx_catch_2);
         FX_THROW(&v_5, false, _fx_catch_2);
      }
      _fx_R9Ast__id_t rec_1 = { 0, v_6, 0 };
      *fx_result = rec_1;

   _fx_catch_2: ;
      fx_free_exn(&v_5);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 3) {
      fx_exn_t v_7 = {0};
      int_ h_idx_2;
      fx_str_t slit_6 = FX_MAKE_STR("__mul__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_6, &h_idx_2, 0), _fx_catch_3);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_catch_3);
      int_ idx_3 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data;
      int_ v_8;
      if (idx_3 >= 0) {
         v_8 = idx_3;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         int_ idx_4;
         fx_str_t slit_7 = FX_MAKE_STR("__mul__");
         FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_7, &idx_4, 0), _fx_catch_3);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_catch_3);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data = idx_4;
         v_8 = idx_4;
      }
      else {
         fx_str_t slit_8 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_8, &v_7, 0), _fx_catch_3);
         FX_THROW(&v_7, false, _fx_catch_3);
      }
      _fx_R9Ast__id_t rec_2 = { 0, v_8, 0 };
      *fx_result = rec_2;

   _fx_catch_3: ;
      fx_free_exn(&v_7);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 4) {
      fx_exn_t v_9 = {0};
      int_ h_idx_3;
      fx_str_t slit_9 = FX_MAKE_STR("__div__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_9, &h_idx_3, 0), _fx_catch_4);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_3), _fx_catch_4);
      int_ idx_5 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_3)->data;
      int_ v_10;
      if (idx_5 >= 0) {
         v_10 = idx_5;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         int_ idx_6;
         fx_str_t slit_10 = FX_MAKE_STR("__div__");
         FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_10, &idx_6, 0), _fx_catch_4);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_3), _fx_catch_4);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_3)->data = idx_6;
         v_10 = idx_6;
      }
      else {
         fx_str_t slit_11 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_11, &v_9, 0), _fx_catch_4);
         FX_THROW(&v_9, false, _fx_catch_4);
      }
      _fx_R9Ast__id_t rec_3 = { 0, v_10, 0 };
      *fx_result = rec_3;

   _fx_catch_4: ;
      fx_free_exn(&v_9);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 5) {
      FX_CALL(_fx_M3AstFM13fname_op_rdivRM4id_t0(fx_result, 0), _fx_catch_5);  _fx_catch_5: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 6) {
      FX_CALL(_fx_M3AstFM12fname_op_modRM4id_t0(fx_result, 0), _fx_catch_6);  _fx_catch_6: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 7) {
      FX_CALL(_fx_M3AstFM12fname_op_powRM4id_t0(fx_result, 0), _fx_catch_7);  _fx_catch_7: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 10) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_addRM4id_t0(fx_result, 0), _fx_catch_8);  _fx_catch_8: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 11) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_subRM4id_t0(fx_result, 0), _fx_catch_9);  _fx_catch_9: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 12) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_mulRM4id_t0(fx_result, 0), _fx_catch_10);  _fx_catch_10: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 13) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_divRM4id_t0(fx_result, 0), _fx_catch_11);  _fx_catch_11: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 14) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_modRM4id_t0(fx_result, 0), _fx_catch_12);  _fx_catch_12: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 15) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_powRM4id_t0(fx_result, 0), _fx_catch_13);  _fx_catch_13: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 8) {
      FX_CALL(_fx_M3AstFM12fname_op_shlRM4id_t0(fx_result, 0), _fx_catch_14);  _fx_catch_14: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 9) {
      FX_CALL(_fx_M3AstFM12fname_op_shrRM4id_t0(fx_result, 0), _fx_catch_15);  _fx_catch_15: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 16) {
      FX_CALL(_fx_M3AstFM16fname_op_bit_andRM4id_t0(fx_result, 0), _fx_catch_16);  _fx_catch_16: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 18) {
      FX_CALL(_fx_M3AstFM15fname_op_bit_orRM4id_t0(fx_result, 0), _fx_catch_17);  _fx_catch_17: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 20) {
      FX_CALL(_fx_M3AstFM16fname_op_bit_xorRM4id_t0(fx_result, 0), _fx_catch_18);  _fx_catch_18: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 23) {
      FX_CALL(_fx_M3AstFM12fname_op_cmpRM4id_t0(fx_result, 0), _fx_catch_19);  _fx_catch_19: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 25) {
      FX_CALL(_fx_M3AstFM13fname_op_sameRM4id_t0(fx_result, 0), _fx_catch_20);  _fx_catch_20: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 21) {
      if (bop_0->u.OpCmp.tag == 1) {
         FX_CALL(_fx_M3AstFM11fname_op_eqRM4id_t0(fx_result, 0), _fx_catch_21);  _fx_catch_21: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 21) {
      if (bop_0->u.OpCmp.tag == 2) {
         FX_CALL(_fx_M3AstFM11fname_op_neRM4id_t0(fx_result, 0), _fx_catch_22);  _fx_catch_22: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 21) {
      if (bop_0->u.OpCmp.tag == 3) {
         FX_CALL(_fx_M3AstFM11fname_op_ltRM4id_t0(fx_result, 0), _fx_catch_23);  _fx_catch_23: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 21) {
      if (bop_0->u.OpCmp.tag == 4) {
         FX_CALL(_fx_M3AstFM11fname_op_leRM4id_t0(fx_result, 0), _fx_catch_24);  _fx_catch_24: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 21) {
      if (bop_0->u.OpCmp.tag == 5) {
         FX_CALL(_fx_M3AstFM11fname_op_geRM4id_t0(fx_result, 0), _fx_catch_25);  _fx_catch_25: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 21) {
      if (bop_0->u.OpCmp.tag == 6) {
         FX_CALL(_fx_M3AstFM11fname_op_gtRM4id_t0(fx_result, 0), _fx_catch_26);  _fx_catch_26: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 24) {
      FX_CALL(_fx_M3AstFM16fname_op_dot_cmpRM4id_t0(fx_result, 0), _fx_catch_27);  _fx_catch_27: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 22) {
      if (bop_0->u.OpDotCmp.tag == 1) {
         FX_CALL(_fx_M3AstFM15fname_op_dot_eqRM4id_t0(fx_result, 0), _fx_catch_28);  _fx_catch_28: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 22) {
      if (bop_0->u.OpDotCmp.tag == 2) {
         FX_CALL(_fx_M3AstFM15fname_op_dot_neRM4id_t0(fx_result, 0), _fx_catch_29);  _fx_catch_29: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 22) {
      if (bop_0->u.OpDotCmp.tag == 3) {
         FX_CALL(_fx_M3AstFM15fname_op_dot_ltRM4id_t0(fx_result, 0), _fx_catch_30);  _fx_catch_30: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 22) {
      if (bop_0->u.OpDotCmp.tag == 4) {
         FX_CALL(_fx_M3AstFM15fname_op_dot_leRM4id_t0(fx_result, 0), _fx_catch_31);  _fx_catch_31: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 22) {
      if (bop_0->u.OpDotCmp.tag == 5) {
         FX_CALL(_fx_M3AstFM15fname_op_dot_geRM4id_t0(fx_result, 0), _fx_catch_32);  _fx_catch_32: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 22) {
      if (bop_0->u.OpDotCmp.tag == 6) {
         FX_CALL(_fx_M3AstFM15fname_op_dot_gtRM4id_t0(fx_result, 0), _fx_catch_33);  _fx_catch_33: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 1) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_addRM4id_t0(fx_result, 0), _fx_catch_34);  _fx_catch_34: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 2) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_subRM4id_t0(fx_result, 0), _fx_catch_35);  _fx_catch_35: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 3) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_mulRM4id_t0(fx_result, 0), _fx_catch_36);  _fx_catch_36: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 4) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_divRM4id_t0(fx_result, 0), _fx_catch_37);  _fx_catch_37: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 6) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_modRM4id_t0(fx_result, 0), _fx_catch_38);  _fx_catch_38: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 16) {
         FX_CALL(_fx_M3AstFM20fname_op_aug_bit_andRM4id_t0(fx_result, 0), _fx_catch_39);  _fx_catch_39: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 18) {
         FX_CALL(_fx_M3AstFM19fname_op_aug_bit_orRM4id_t0(fx_result, 0), _fx_catch_40);  _fx_catch_40: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 20) {
         FX_CALL(_fx_M3AstFM20fname_op_aug_bit_xorRM4id_t0(fx_result, 0), _fx_catch_41);  _fx_catch_41: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 12) {
         FX_CALL(_fx_M3AstFM20fname_op_aug_dot_mulRM4id_t0(fx_result, 0), _fx_catch_42);  _fx_catch_42: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 13) {
         FX_CALL(_fx_M3AstFM20fname_op_aug_dot_divRM4id_t0(fx_result, 0), _fx_catch_43);  _fx_catch_43: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 14) {
         FX_CALL(_fx_M3AstFM20fname_op_aug_dot_modRM4id_t0(fx_result, 0), _fx_catch_44);  _fx_catch_44: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 8) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_shlRM4id_t0(fx_result, 0), _fx_catch_45);  _fx_catch_45: ; goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 27) {
      if (FX_REC_VARIANT_TAG(bop_0->u.OpAugBinary) == 9) {
         FX_CALL(_fx_M3AstFM16fname_op_aug_shrRM4id_t0(fx_result, 0), _fx_catch_46);  _fx_catch_46: ; goto _fx_endmatch_0;
      }
   }
   bool res_0;
   if (tag_0 == 17) {
      res_0 = true;
   }
   else if (tag_0 == 19) {
      res_0 = true;
   }
   else if (tag_0 == 26) {
      res_0 = true;
   }
   else if (tag_0 == 27) {
      res_0 = true;
   }
   else {
      res_0 = false;
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (res_0) {
      fx_str_t v_11 = {0};
      fx_str_t v_12 = {0};
      fx_exn_t v_13 = {0};
      FX_CALL(_fx_M3AstFM6stringS1N13Ast__binary_t(bop_0, &v_11, 0), _fx_catch_47);
      fx_str_t slit_12 = FX_MAKE_STR("for binary operation \"");
      fx_str_t slit_13 = FX_MAKE_STR("\" there is no corresponding function");
      {
         const fx_str_t strs_0[] = { slit_12, v_11, slit_13 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, &v_12), _fx_catch_47);
      }
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_12, &v_13, 0), _fx_catch_47);
      FX_THROW(&v_13, false, _fx_catch_47);

   _fx_catch_47: ;
      fx_free_exn(&v_13);
      FX_FREE_STR(&v_12);
      FX_FREE_STR(&v_11);
      goto _fx_endmatch_0;
   }
   FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM15get_unary_fnameRM4id_t2N12Ast__unary_tRM5loc_t(
   struct _fx_N12Ast__unary_t* uop_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = uop_0->tag;
   if (tag_0 == 9) {
      fx_arr_t v_0 = {0};
      fx_arr_t old_data_0 = {0};
      fx_str_t val0_0 = {0};
      fx_arr_t new_data_0 = {0};
      fx_str_t fname_0 = {0};
      fx_str_t v_1 = {0};
      fx_str_t v_2 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_3 = {0};
      int_ h_idx_0;
      fx_str_t slit_0 = FX_MAKE_STR("__apos__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_catch_2);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_2);
      int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
      int_ v_4;
      if (idx_0 >= 0) {
         v_4 = idx_0;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
         int_ sz_0 = FX_ARR_SIZE(v_0, 0);
         int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
         if (sz_0 <= n0_0) {
            int_ n1_0 = fx_maxi(n0_0, 128) * 2;
            fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
            fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
            fx_str_t* dstptr_0 = 0;
            {
               const int_ shape_0[] = { n1_0 };
               FX_CALL(
                  fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
                  _fx_catch_2);
            }
            dstptr_0 = (fx_str_t*)new_data_0.data;
            for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
               fx_str_t t_0 = {0};
               if (i_0 < n0_0) {
                  FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0);
                  fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
               }
               else {
                  fx_copy_str(&val0_0, &t_0);
               }
               fx_copy_str(&t_0, dstptr_0);

            _fx_catch_0: ;
               FX_FREE_STR(&t_0);
               FX_CHECK_EXN(_fx_catch_2);
            }
            fx_arr_t* v_5 = &_fx_g14Ast__all_names->u.t.t1;
            FX_FREE_ARR(v_5);
            fx_copy_arr(&new_data_0, v_5);
         }
         _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_catch_2);
         fx_str_t* v_6 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
         fx_str_t slit_1 = FX_MAKE_STR("__apos__");
         FX_FREE_STR(v_6);
         fx_copy_str(&slit_1, v_6);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_2);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
         v_4 = n0_0;
      }
      else {
         if (_fx_g10Ast__noloc.m_idx >= 0) {
            int_ v_7 = _fx_g10Ast__noloc.m_idx;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_catch_2);
            fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
         }
         else {
            fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
         }
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_1, 0), _fx_catch_2);
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_2, 0), _fx_catch_2);
         fx_str_t slit_3 = FX_MAKE_STR(":");
         fx_str_t slit_4 = FX_MAKE_STR(":");
         fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
         {
            const fx_str_t strs_0[] = { fname_0, slit_3, v_1, slit_4, v_2, slit_5 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_catch_2);
         }
         FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
         if (all_compile_err_ctx_0 == 0) {
            fx_copy_str(&whole_msg_0, &whole_msg_1);
         }
         else {
            _fx_LS v_8 = 0;
            FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_1);
            fx_str_t slit_6 =
               FX_MAKE_STR("\n"
                  U"\t");
            FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_1);

         _fx_catch_1: ;
            if (v_8) {
               _fx_free_LS(&v_8);
            }
         }
         FX_CHECK_EXN(_fx_catch_2);
         FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_3), _fx_catch_2);
         FX_THROW(&v_3, true, _fx_catch_2);
      }
      _fx_R9Ast__id_t rec_0 = { 0, v_4, 0 };
      *fx_result = rec_0;

   _fx_catch_2: ;
      fx_free_exn(&v_3);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_2);
      FX_FREE_STR(&v_1);
      FX_FREE_STR(&fname_0);
      FX_FREE_ARR(&new_data_0);
      FX_FREE_STR(&val0_0);
      FX_FREE_ARR(&old_data_0);
      FX_FREE_ARR(&v_0);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 1) {
      fx_arr_t v_9 = {0};
      fx_arr_t old_data_1 = {0};
      fx_str_t val0_1 = {0};
      fx_arr_t new_data_1 = {0};
      fx_str_t fname_1 = {0};
      fx_str_t v_10 = {0};
      fx_str_t v_11 = {0};
      fx_str_t whole_msg_2 = {0};
      _fx_LS all_compile_err_ctx_1 = 0;
      fx_str_t whole_msg_3 = {0};
      fx_exn_t v_12 = {0};
      int_ h_idx_1;
      fx_str_t slit_7 = FX_MAKE_STR("__plus__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_7, &h_idx_1, 0), _fx_catch_5);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_catch_5);
      int_ idx_1 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data;
      int_ v_13;
      if (idx_1 >= 0) {
         v_13 = idx_1;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_9);
         int_ sz_1 = FX_ARR_SIZE(v_9, 0);
         int_ n0_1 = _fx_g14Ast__all_names->u.t.t0;
         if (sz_1 <= n0_1) {
            int_ n1_1 = fx_maxi(n0_1, 128) * 2;
            fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_1);
            fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_1);
            fx_str_t* dstptr_1 = 0;
            {
               const int_ shape_1[] = { n1_1 };
               FX_CALL(
                  fx_make_arr(1, shape_1, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_1),
                  _fx_catch_5);
            }
            dstptr_1 = (fx_str_t*)new_data_1.data;
            for (int_ i_1 = 0; i_1 < n1_1; i_1++, dstptr_1++) {
               fx_str_t t_1 = {0};
               if (i_1 < n0_1) {
                  FX_CHKIDX(FX_CHKIDX1(old_data_1, 0, i_1), _fx_catch_3);
                  fx_copy_str(FX_PTR_1D(fx_str_t, old_data_1, i_1), &t_1);
               }
               else {
                  fx_copy_str(&val0_1, &t_1);
               }
               fx_copy_str(&t_1, dstptr_1);

            _fx_catch_3: ;
               FX_FREE_STR(&t_1);
               FX_CHECK_EXN(_fx_catch_5);
            }
            fx_arr_t* v_14 = &_fx_g14Ast__all_names->u.t.t1;
            FX_FREE_ARR(v_14);
            fx_copy_arr(&new_data_1, v_14);
         }
         _fx_g14Ast__all_names->u.t.t0 = n0_1 + 1;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_1), _fx_catch_5);
         fx_str_t* v_15 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_1);
         fx_str_t slit_8 = FX_MAKE_STR("__plus__");
         FX_FREE_STR(v_15);
         fx_copy_str(&slit_8, v_15);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_catch_5);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data = n0_1;
         v_13 = n0_1;
      }
      else {
         if (_fx_g10Ast__noloc.m_idx >= 0) {
            int_ v_16 = _fx_g10Ast__noloc.m_idx;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_16), _fx_catch_5);
            fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_16))->u.defmodule_t.t1, &fname_1);
         }
         else {
            fx_str_t slit_9 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_9, &fname_1);
         }
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_10, 0), _fx_catch_5);
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_11, 0), _fx_catch_5);
         fx_str_t slit_10 = FX_MAKE_STR(":");
         fx_str_t slit_11 = FX_MAKE_STR(":");
         fx_str_t slit_12 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
         {
            const fx_str_t strs_1[] = { fname_1, slit_10, v_10, slit_11, v_11, slit_12 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_1, 6, &whole_msg_2), _fx_catch_5);
         }
         FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_1);
         if (all_compile_err_ctx_1 == 0) {
            fx_copy_str(&whole_msg_2, &whole_msg_3);
         }
         else {
            _fx_LS v_17 = 0;
            FX_CALL(_fx_cons_LS(&whole_msg_2, all_compile_err_ctx_1, true, &v_17), _fx_catch_4);
            fx_str_t slit_13 =
               FX_MAKE_STR("\n"
                  U"\t");
            FX_CALL(_fx_F4joinS2SLS(&slit_13, v_17, &whole_msg_3, 0), _fx_catch_4);

         _fx_catch_4: ;
            if (v_17) {
               _fx_free_LS(&v_17);
            }
         }
         FX_CHECK_EXN(_fx_catch_5);
         FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_3, &v_12), _fx_catch_5);
         FX_THROW(&v_12, true, _fx_catch_5);
      }
      _fx_R9Ast__id_t rec_1 = { 0, v_13, 0 };
      *fx_result = rec_1;

   _fx_catch_5: ;
      fx_free_exn(&v_12);
      FX_FREE_STR(&whole_msg_3);
      if (all_compile_err_ctx_1) {
         _fx_free_LS(&all_compile_err_ctx_1);
      }
      FX_FREE_STR(&whole_msg_2);
      FX_FREE_STR(&v_11);
      FX_FREE_STR(&v_10);
      FX_FREE_STR(&fname_1);
      FX_FREE_ARR(&new_data_1);
      FX_FREE_STR(&val0_1);
      FX_FREE_ARR(&old_data_1);
      FX_FREE_ARR(&v_9);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 2) {
      fx_arr_t v_18 = {0};
      fx_arr_t old_data_2 = {0};
      fx_str_t val0_2 = {0};
      fx_arr_t new_data_2 = {0};
      fx_str_t fname_2 = {0};
      fx_str_t v_19 = {0};
      fx_str_t v_20 = {0};
      fx_str_t whole_msg_4 = {0};
      _fx_LS all_compile_err_ctx_2 = 0;
      fx_str_t whole_msg_5 = {0};
      fx_exn_t v_21 = {0};
      int_ h_idx_2;
      fx_str_t slit_14 = FX_MAKE_STR("__negate__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_14, &h_idx_2, 0), _fx_catch_8);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_catch_8);
      int_ idx_2 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data;
      int_ v_22;
      if (idx_2 >= 0) {
         v_22 = idx_2;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_18);
         int_ sz_2 = FX_ARR_SIZE(v_18, 0);
         int_ n0_2 = _fx_g14Ast__all_names->u.t.t0;
         if (sz_2 <= n0_2) {
            int_ n1_2 = fx_maxi(n0_2, 128) * 2;
            fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_2);
            fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_2);
            fx_str_t* dstptr_2 = 0;
            {
               const int_ shape_2[] = { n1_2 };
               FX_CALL(
                  fx_make_arr(1, shape_2, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_2),
                  _fx_catch_8);
            }
            dstptr_2 = (fx_str_t*)new_data_2.data;
            for (int_ i_2 = 0; i_2 < n1_2; i_2++, dstptr_2++) {
               fx_str_t t_2 = {0};
               if (i_2 < n0_2) {
                  FX_CHKIDX(FX_CHKIDX1(old_data_2, 0, i_2), _fx_catch_6);
                  fx_copy_str(FX_PTR_1D(fx_str_t, old_data_2, i_2), &t_2);
               }
               else {
                  fx_copy_str(&val0_2, &t_2);
               }
               fx_copy_str(&t_2, dstptr_2);

            _fx_catch_6: ;
               FX_FREE_STR(&t_2);
               FX_CHECK_EXN(_fx_catch_8);
            }
            fx_arr_t* v_23 = &_fx_g14Ast__all_names->u.t.t1;
            FX_FREE_ARR(v_23);
            fx_copy_arr(&new_data_2, v_23);
         }
         _fx_g14Ast__all_names->u.t.t0 = n0_2 + 1;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_2), _fx_catch_8);
         fx_str_t* v_24 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_2);
         fx_str_t slit_15 = FX_MAKE_STR("__negate__");
         FX_FREE_STR(v_24);
         fx_copy_str(&slit_15, v_24);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_catch_8);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data = n0_2;
         v_22 = n0_2;
      }
      else {
         if (_fx_g10Ast__noloc.m_idx >= 0) {
            int_ v_25 = _fx_g10Ast__noloc.m_idx;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_25), _fx_catch_8);
            fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_25))->u.defmodule_t.t1, &fname_2);
         }
         else {
            fx_str_t slit_16 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_16, &fname_2);
         }
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_19, 0), _fx_catch_8);
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_20, 0), _fx_catch_8);
         fx_str_t slit_17 = FX_MAKE_STR(":");
         fx_str_t slit_18 = FX_MAKE_STR(":");
         fx_str_t slit_19 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
         {
            const fx_str_t strs_2[] = { fname_2, slit_17, v_19, slit_18, v_20, slit_19 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_2, 6, &whole_msg_4), _fx_catch_8);
         }
         FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_2);
         if (all_compile_err_ctx_2 == 0) {
            fx_copy_str(&whole_msg_4, &whole_msg_5);
         }
         else {
            _fx_LS v_26 = 0;
            FX_CALL(_fx_cons_LS(&whole_msg_4, all_compile_err_ctx_2, true, &v_26), _fx_catch_7);
            fx_str_t slit_20 =
               FX_MAKE_STR("\n"
                  U"\t");
            FX_CALL(_fx_F4joinS2SLS(&slit_20, v_26, &whole_msg_5, 0), _fx_catch_7);

         _fx_catch_7: ;
            if (v_26) {
               _fx_free_LS(&v_26);
            }
         }
         FX_CHECK_EXN(_fx_catch_8);
         FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_5, &v_21), _fx_catch_8);
         FX_THROW(&v_21, true, _fx_catch_8);
      }
      _fx_R9Ast__id_t rec_2 = { 0, v_22, 0 };
      *fx_result = rec_2;

   _fx_catch_8: ;
      fx_free_exn(&v_21);
      FX_FREE_STR(&whole_msg_5);
      if (all_compile_err_ctx_2) {
         _fx_free_LS(&all_compile_err_ctx_2);
      }
      FX_FREE_STR(&whole_msg_4);
      FX_FREE_STR(&v_20);
      FX_FREE_STR(&v_19);
      FX_FREE_STR(&fname_2);
      FX_FREE_ARR(&new_data_2);
      FX_FREE_STR(&val0_2);
      FX_FREE_ARR(&old_data_2);
      FX_FREE_ARR(&v_18);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 3) {
      fx_exn_t v_27 = {0};
      int_ h_idx_3;
      fx_str_t slit_21 = FX_MAKE_STR("__dot_minus__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_21, &h_idx_3, 0), _fx_catch_9);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_3), _fx_catch_9);
      int_ idx_3 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_3)->data;
      int_ v_28;
      if (idx_3 >= 0) {
         v_28 = idx_3;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         int_ idx_4;
         fx_str_t slit_22 = FX_MAKE_STR("__dot_minus__");
         FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_22, &idx_4, 0), _fx_catch_9);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_3), _fx_catch_9);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_3)->data = idx_4;
         v_28 = idx_4;
      }
      else {
         fx_str_t slit_23 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_23, &v_27, 0), _fx_catch_9);
         FX_THROW(&v_27, false, _fx_catch_9);
      }
      _fx_R9Ast__id_t rec_3 = { 0, v_28, 0 };
      *fx_result = rec_3;

   _fx_catch_9: ;
      fx_free_exn(&v_27);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 4) {
      fx_exn_t v_29 = {0};
      int_ h_idx_4;
      fx_str_t slit_24 = FX_MAKE_STR("__bit_not__");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_24, &h_idx_4, 0),
         _fx_catch_10);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_4), _fx_catch_10);
      int_ idx_5 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_4)->data;
      int_ v_30;
      if (idx_5 >= 0) {
         v_30 = idx_5;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         int_ idx_6;
         fx_str_t slit_25 = FX_MAKE_STR("__bit_not__");
         FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_25, &idx_6, 0), _fx_catch_10);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_4), _fx_catch_10);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_4)->data = idx_6;
         v_30 = idx_6;
      }
      else {
         fx_str_t slit_26 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
         FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_26, &v_29, 0), _fx_catch_10);
         FX_THROW(&v_29, false, _fx_catch_10);
      }
      _fx_R9Ast__id_t rec_4 = { 0, v_30, 0 };
      *fx_result = rec_4;

   _fx_catch_10: ;
      fx_free_exn(&v_29);
      goto _fx_endmatch_0;
   }
   bool res_0;
   if (tag_0 == 5) {
      res_0 = true;
   }
   else if (tag_0 == 8) {
      res_0 = true;
   }
   else if (tag_0 == 6) {
      res_0 = true;
   }
   else if (tag_0 == 7) {
      res_0 = true;
   }
   else {
      res_0 = false;
   }
   FX_CHECK_EXN(_fx_cleanup);
   if (res_0) {
      fx_str_t v_31 = {0};
      fx_str_t v_32 = {0};
      fx_exn_t v_33 = {0};
      int tag_1 = uop_0->tag;
      if (tag_1 == 1) {
         fx_str_t slit_27 = FX_MAKE_STR("+"); fx_copy_str(&slit_27, &v_31);
      }
      else if (tag_1 == 2) {
         fx_str_t slit_28 = FX_MAKE_STR("-"); fx_copy_str(&slit_28, &v_31);
      }
      else if (tag_1 == 3) {
         fx_str_t slit_29 = FX_MAKE_STR(".-"); fx_copy_str(&slit_29, &v_31);
      }
      else if (tag_1 == 4) {
         fx_str_t slit_30 = FX_MAKE_STR("~"); fx_copy_str(&slit_30, &v_31);
      }
      else if (tag_1 == 5) {
         fx_str_t slit_31 = FX_MAKE_STR("!"); fx_copy_str(&slit_31, &v_31);
      }
      else if (tag_1 == 8) {
         fx_str_t slit_32 = FX_MAKE_STR("\\"); fx_copy_str(&slit_32, &v_31);
      }
      else if (tag_1 == 6) {
         fx_str_t slit_33 = FX_MAKE_STR("REF"); fx_copy_str(&slit_33, &v_31);
      }
      else if (tag_1 == 7) {
         fx_str_t slit_34 = FX_MAKE_STR("*"); fx_copy_str(&slit_34, &v_31);
      }
      else if (tag_1 == 9) {
         fx_str_t slit_35 = FX_MAKE_STR("\'"); fx_copy_str(&slit_35, &v_31);
      }
      else {
         FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_11);
      }
      FX_CHECK_EXN(_fx_catch_11);
      fx_str_t slit_36 = FX_MAKE_STR("for unary operation \"");
      fx_str_t slit_37 = FX_MAKE_STR("\" there is no corresponding function");
      {
         const fx_str_t strs_3[] = { slit_36, v_31, slit_37 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_3, 3, &v_32), _fx_catch_11);
      }
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(loc_0, &v_32, &v_33, 0), _fx_catch_11);
      FX_THROW(&v_33, false, _fx_catch_11);

   _fx_catch_11: ;
      fx_free_exn(&v_33);
      FX_FREE_STR(&v_32);
      FX_FREE_STR(&v_31);
      goto _fx_endmatch_0;
   }
   FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM19fname_always_importLRM4id_t0(struct _fx_LR9Ast__id_t_data_t** fx_result, void* fx_fv)
{
   fx_arr_t v_0 = {0};
   fx_arr_t old_data_0 = {0};
   fx_str_t val0_0 = {0};
   fx_arr_t new_data_0 = {0};
   fx_exn_t v_1 = {0};
   fx_exn_t v_2 = {0};
   fx_exn_t v_3 = {0};
   _fx_LR9Ast__id_t v_4 = 0;
   int fx_status = 0;
   int_ h_idx_0;
   fx_str_t slit_0 = FX_MAKE_STR("__add__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
   int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
   int_ v_5;
   if (idx_0 >= 0) {
      v_5 = idx_0;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_0);
      int_ sz_0 = FX_ARR_SIZE(v_0, 0);
      int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
      if (sz_0 <= n0_0) {
         int_ n1_0 = fx_maxi(n0_0, 128) * 2;
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
         fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
         fx_str_t* dstptr_0 = 0;
         {
            const int_ shape_0[] = { n1_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
               _fx_cleanup);
         }
         dstptr_0 = (fx_str_t*)new_data_0.data;
         for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
            fx_str_t t_0 = {0};
            if (i_0 < n0_0) {
               FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_0); fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_0);
            }
            else {
               fx_copy_str(&val0_0, &t_0);
            }
            fx_copy_str(&t_0, dstptr_0);

         _fx_catch_0: ;
            FX_FREE_STR(&t_0);
            FX_CHECK_EXN(_fx_cleanup);
         }
         fx_arr_t* v_6 = &_fx_g14Ast__all_names->u.t.t1;
         FX_FREE_ARR(v_6);
         fx_copy_arr(&new_data_0, v_6);
      }
      _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_cleanup);
      fx_str_t* v_7 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
      fx_str_t slit_1 = FX_MAKE_STR("__add__");
      FX_FREE_STR(v_7);
      fx_copy_str(&slit_1, v_7);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
      v_5 = n0_0;
   }
   else {
      fx_str_t slit_2 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_2, &v_1, 0), _fx_cleanup);
      FX_THROW(&v_1, false, _fx_cleanup);
   }
   _fx_R9Ast__id_t v_8 = { 0, v_5, 0 };
   int_ h_idx_1;
   fx_str_t slit_3 = FX_MAKE_STR("__sub__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_3, &h_idx_1, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_cleanup);
   int_ idx_1 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data;
   int_ v_9;
   if (idx_1 >= 0) {
      v_9 = idx_1;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      int_ idx_2;
      fx_str_t slit_4 = FX_MAKE_STR("__sub__");
      FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_4, &idx_2, 0), _fx_cleanup);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data = idx_2;
      v_9 = idx_2;
   }
   else {
      fx_str_t slit_5 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_5, &v_2, 0), _fx_cleanup);
      FX_THROW(&v_2, false, _fx_cleanup);
   }
   _fx_R9Ast__id_t v_10 = { 0, v_9, 0 };
   int_ h_idx_2;
   fx_str_t slit_6 = FX_MAKE_STR("__mul__");
   FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_6, &h_idx_2, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_cleanup);
   int_ idx_3 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data;
   int_ v_11;
   if (idx_3 >= 0) {
      v_11 = idx_3;
   }
   else if (_fx_g19Ast__lock_all_names == 0) {
      int_ idx_4;
      fx_str_t slit_7 = FX_MAKE_STR("__mul__");
      FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_7, &idx_4, 0), _fx_cleanup);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_cleanup);
      FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data = idx_4;
      v_11 = idx_4;
   }
   else {
      fx_str_t slit_8 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
      FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_8, &v_3, 0), _fx_cleanup);
      FX_THROW(&v_3, false, _fx_cleanup);
   }
   _fx_R9Ast__id_t v_12 = { 0, v_11, 0 };
   _fx_R9Ast__id_t v_13;
   FX_CALL(_fx_M3AstFM12fname_op_divRM4id_t0(&v_13, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_14;
   FX_CALL(_fx_M3AstFM13fname_op_rdivRM4id_t0(&v_14, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_15;
   FX_CALL(_fx_M3AstFM12fname_op_modRM4id_t0(&v_15, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_16;
   FX_CALL(_fx_M3AstFM12fname_op_powRM4id_t0(&v_16, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_17;
   FX_CALL(_fx_M3AstFM16fname_op_dot_addRM4id_t0(&v_17, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_18;
   FX_CALL(_fx_M3AstFM16fname_op_dot_subRM4id_t0(&v_18, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_19;
   FX_CALL(_fx_M3AstFM16fname_op_dot_mulRM4id_t0(&v_19, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_20;
   FX_CALL(_fx_M3AstFM16fname_op_dot_divRM4id_t0(&v_20, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_21;
   FX_CALL(_fx_M3AstFM16fname_op_dot_modRM4id_t0(&v_21, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_22;
   FX_CALL(_fx_M3AstFM16fname_op_dot_powRM4id_t0(&v_22, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_23;
   FX_CALL(_fx_M3AstFM12fname_op_shlRM4id_t0(&v_23, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_24;
   FX_CALL(_fx_M3AstFM12fname_op_shrRM4id_t0(&v_24, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_25;
   FX_CALL(_fx_M3AstFM16fname_op_bit_andRM4id_t0(&v_25, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_26;
   FX_CALL(_fx_M3AstFM15fname_op_bit_orRM4id_t0(&v_26, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_27;
   FX_CALL(_fx_M3AstFM16fname_op_bit_xorRM4id_t0(&v_27, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_28;
   FX_CALL(_fx_M3AstFM12fname_op_cmpRM4id_t0(&v_28, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_29;
   FX_CALL(_fx_M3AstFM16fname_op_dot_cmpRM4id_t0(&v_29, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_30;
   FX_CALL(_fx_M3AstFM13fname_op_sameRM4id_t0(&v_30, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_31;
   FX_CALL(_fx_M3AstFM11fname_op_eqRM4id_t0(&v_31, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_32;
   FX_CALL(_fx_M3AstFM11fname_op_neRM4id_t0(&v_32, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_33;
   FX_CALL(_fx_M3AstFM11fname_op_leRM4id_t0(&v_33, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_34;
   FX_CALL(_fx_M3AstFM11fname_op_geRM4id_t0(&v_34, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_35;
   FX_CALL(_fx_M3AstFM11fname_op_ltRM4id_t0(&v_35, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_36;
   FX_CALL(_fx_M3AstFM11fname_op_gtRM4id_t0(&v_36, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_37;
   FX_CALL(_fx_M3AstFM15fname_op_dot_eqRM4id_t0(&v_37, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_38;
   FX_CALL(_fx_M3AstFM15fname_op_dot_neRM4id_t0(&v_38, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_39;
   FX_CALL(_fx_M3AstFM15fname_op_dot_leRM4id_t0(&v_39, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_40;
   FX_CALL(_fx_M3AstFM15fname_op_dot_geRM4id_t0(&v_40, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_41;
   FX_CALL(_fx_M3AstFM15fname_op_dot_ltRM4id_t0(&v_41, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_42;
   FX_CALL(_fx_M3AstFM15fname_op_dot_gtRM4id_t0(&v_42, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_43;
   FX_CALL(_fx_M3AstFM13fname_op_plusRM4id_t0(&v_43, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_44;
   FX_CALL(_fx_M3AstFM15fname_op_negateRM4id_t0(&v_44, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_45;
   FX_CALL(_fx_M3AstFM18fname_op_dot_minusRM4id_t0(&v_45, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_46;
   FX_CALL(_fx_M3AstFM16fname_op_bit_notRM4id_t0(&v_46, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_47;
   FX_CALL(_fx_M3AstFM16fname_op_aug_addRM4id_t0(&v_47, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_48;
   FX_CALL(_fx_M3AstFM16fname_op_aug_subRM4id_t0(&v_48, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_49;
   FX_CALL(_fx_M3AstFM16fname_op_aug_mulRM4id_t0(&v_49, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_50;
   FX_CALL(_fx_M3AstFM16fname_op_aug_divRM4id_t0(&v_50, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_51;
   FX_CALL(_fx_M3AstFM16fname_op_aug_modRM4id_t0(&v_51, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_52;
   FX_CALL(_fx_M3AstFM20fname_op_aug_bit_andRM4id_t0(&v_52, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_53;
   FX_CALL(_fx_M3AstFM19fname_op_aug_bit_orRM4id_t0(&v_53, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_54;
   FX_CALL(_fx_M3AstFM20fname_op_aug_bit_xorRM4id_t0(&v_54, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_55;
   FX_CALL(_fx_M3AstFM20fname_op_aug_dot_mulRM4id_t0(&v_55, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_56;
   FX_CALL(_fx_M3AstFM20fname_op_aug_dot_divRM4id_t0(&v_56, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_57;
   FX_CALL(_fx_M3AstFM20fname_op_aug_dot_modRM4id_t0(&v_57, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_58;
   FX_CALL(_fx_M3AstFM16fname_op_aug_shlRM4id_t0(&v_58, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_59;
   FX_CALL(_fx_M3AstFM16fname_op_aug_shrRM4id_t0(&v_59, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_60;
   FX_CALL(_fx_M3AstFM13fname_op_aposRM4id_t0(&v_60, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_61;
   FX_CALL(_fx_M3AstFM12fname_to_intRM4id_t0(&v_61, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_62;
   FX_CALL(_fx_M3AstFM13fname_to_longRM4id_t0(&v_62, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_63;
   FX_CALL(_fx_M3AstFM14fname_to_uint8RM4id_t0(&v_63, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_64;
   FX_CALL(_fx_M3AstFM13fname_to_int8RM4id_t0(&v_64, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_65;
   FX_CALL(_fx_M3AstFM15fname_to_uint16RM4id_t0(&v_65, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_66;
   FX_CALL(_fx_M3AstFM14fname_to_int16RM4id_t0(&v_66, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_67;
   FX_CALL(_fx_M3AstFM15fname_to_uint32RM4id_t0(&v_67, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_68;
   FX_CALL(_fx_M3AstFM14fname_to_int32RM4id_t0(&v_68, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_69;
   FX_CALL(_fx_M3AstFM15fname_to_uint64RM4id_t0(&v_69, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_70;
   FX_CALL(_fx_M3AstFM14fname_to_int64RM4id_t0(&v_70, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_71;
   FX_CALL(_fx_M3AstFM14fname_to_floatRM4id_t0(&v_71, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_72;
   FX_CALL(_fx_M3AstFM15fname_to_doubleRM4id_t0(&v_72, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_73;
   FX_CALL(_fx_M3AstFM13fname_to_boolRM4id_t0(&v_73, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_74;
   FX_CALL(_fx_M3AstFM12fname_stringRM4id_t0(&v_74, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_75;
   FX_CALL(_fx_M3AstFM11fname_printRM4id_t0(&v_75, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_76;
   FX_CALL(_fx_M3AstFM10fname_reprRM4id_t0(&v_76, 0), _fx_cleanup);
   _fx_R9Ast__id_t v_77;
   FX_CALL(_fx_M3AstFM10fname_hashRM4id_t0(&v_77, 0), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_77, 0, true, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_76, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_75, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_74, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_73, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_72, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_71, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_70, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_69, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_68, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_67, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_66, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_65, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_64, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_63, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_62, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_61, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_60, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_59, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_58, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_57, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_56, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_55, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_54, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_53, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_52, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_51, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_50, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_49, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_48, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_47, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_46, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_45, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_44, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_43, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_42, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_41, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_40, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_39, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_38, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_37, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_36, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_35, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_34, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_33, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_32, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_31, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_30, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_29, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_28, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_27, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_26, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_25, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_24, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_23, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_22, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_21, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_20, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_19, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_18, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_17, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_16, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_15, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_14, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_13, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_12, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_10, v_4, false, &v_4), _fx_cleanup);
   FX_CALL(_fx_cons_LR9Ast__id_t(&v_8, v_4, true, fx_result), _fx_cleanup);

_fx_cleanup: ;
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&old_data_0);
   FX_FREE_STR(&val0_0);
   FX_FREE_ARR(&new_data_0);
   fx_free_exn(&v_1);
   fx_free_exn(&v_2);
   fx_free_exn(&v_3);
   FX_FREE_LIST_SIMPLE(&v_4);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14get_cast_fnameRM4id_t2N10Ast__typ_tRM5loc_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R9Ast__id_t* fx_result,
   void* fx_fv)
{
   _fx_N10Ast__typ_t v_0 = 0;
   int fx_status = 0;
   if (FX_REC_VARIANT_TAG(t_0) == 1) {
      _fx_N10Ast__typ_t v_1 = 0;
      _fx_N10Ast__typ_t result_0 = 0;
      _fx_N10Ast__typ_t t_1 = 0;
      _fx_N10Ast__typ_t root_0 = 0;
      FX_CALL(_fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(t_0, &v_1, 0), _fx_catch_3);
      FX_COPY_PTR(t_0, &t_1);
      FX_COPY_PTR(v_1, &root_0);
      for (;;) {
         _fx_N10Ast__typ_t t_2 = 0;
         _fx_N10Ast__typ_t root_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_2 = 0;
         _fx_Nt6option1N10Ast__typ_t v_3 = 0;
         FX_COPY_PTR(t_1, &t_2);
         FX_COPY_PTR(root_0, &root_1);
         if (FX_REC_VARIANT_TAG(t_2) == 1) {
            _fx_rNt6option1N10Ast__typ_t r_0 = t_2->u.TypVar;
            FX_COPY_PTR(r_0->data, &v_2);
            if ((v_2 != 0) + 1 == 2) {
               _fx_N10Ast__typ_t t1_0 = v_2->u.Some;
               if (FX_REC_VARIANT_TAG(t1_0) == 1) {
                  FX_COPY_PTR(t1_0->u.TypVar->data, &v_3);
                  if ((v_3 != 0) + 1 == 2) {
                     _fx_Nt6option1N10Ast__typ_t v_4 = 0;
                     FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(root_1, &v_4), _fx_catch_0);
                     _fx_Nt6option1N10Ast__typ_t* v_5 = &r_0->data;
                     _fx_free_Nt6option1N10Ast__typ_t(v_5);
                     FX_COPY_PTR(v_4, v_5);
                     _fx_free_N10Ast__typ_t(&t_1);
                     FX_COPY_PTR(t1_0, &t_1);
                     _fx_free_N10Ast__typ_t(&root_0);
                     FX_COPY_PTR(root_1, &root_0);

                  _fx_catch_0: ;
                     if (v_4) {
                        _fx_free_Nt6option1N10Ast__typ_t(&v_4);
                     }
                     goto _fx_endmatch_0;
                  }
               }
            }
         }
         _fx_free_N10Ast__typ_t(&result_0);
         FX_COPY_PTR(root_1, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         if (v_3) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_3);
         }
         if (v_2) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_2);
         }
         if (root_1) {
            _fx_free_N10Ast__typ_t(&root_1);
         }
         if (t_2) {
            _fx_free_N10Ast__typ_t(&t_2);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_3);
      }
      FX_COPY_PTR(result_0, &v_0);

   _fx_catch_3: ;
      if (root_0) {
         _fx_free_N10Ast__typ_t(&root_0);
      }
      if (t_1) {
         _fx_free_N10Ast__typ_t(&t_1);
      }
      if (result_0) {
         _fx_free_N10Ast__typ_t(&result_0);
      }
      if (v_1) {
         _fx_free_N10Ast__typ_t(&v_1);
      }
   }
   else {
      FX_COPY_PTR(t_0, &v_0);
   }
   FX_CHECK_EXN(_fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(v_0);
   if (tag_0 == 5) {
      fx_arr_t v_6 = {0};
      fx_arr_t old_data_0 = {0};
      fx_str_t val0_0 = {0};
      fx_arr_t new_data_0 = {0};
      fx_str_t fname_0 = {0};
      fx_str_t v_7 = {0};
      fx_str_t v_8 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_9 = {0};
      int_ h_idx_0;
      fx_str_t slit_0 = FX_MAKE_STR("int");
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_0, &h_idx_0, 0), _fx_catch_6);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_6);
      int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
      int_ v_10;
      if (idx_0 >= 0) {
         v_10 = idx_0;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_6);
         int_ sz_0 = FX_ARR_SIZE(v_6, 0);
         int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
         if (sz_0 <= n0_0) {
            int_ n1_0 = fx_maxi(n0_0, 128) * 2;
            fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
            fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
            fx_str_t* dstptr_0 = 0;
            {
               const int_ shape_0[] = { n1_0 };
               FX_CALL(
                  fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
                  _fx_catch_6);
            }
            dstptr_0 = (fx_str_t*)new_data_0.data;
            for (int_ i_0 = 0; i_0 < n1_0; i_0++, dstptr_0++) {
               fx_str_t t_3 = {0};
               if (i_0 < n0_0) {
                  FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_0), _fx_catch_4);
                  fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_0), &t_3);
               }
               else {
                  fx_copy_str(&val0_0, &t_3);
               }
               fx_copy_str(&t_3, dstptr_0);

            _fx_catch_4: ;
               FX_FREE_STR(&t_3);
               FX_CHECK_EXN(_fx_catch_6);
            }
            fx_arr_t* v_11 = &_fx_g14Ast__all_names->u.t.t1;
            FX_FREE_ARR(v_11);
            fx_copy_arr(&new_data_0, v_11);
         }
         _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_catch_6);
         fx_str_t* v_12 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
         fx_str_t slit_1 = FX_MAKE_STR("int");
         FX_FREE_STR(v_12);
         fx_copy_str(&slit_1, v_12);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_6);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
         v_10 = n0_0;
      }
      else {
         if (_fx_g10Ast__noloc.m_idx >= 0) {
            int_ v_13 = _fx_g10Ast__noloc.m_idx;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_13), _fx_catch_6);
            fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_13))->u.defmodule_t.t1, &fname_0);
         }
         else {
            fx_str_t slit_2 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_2, &fname_0);
         }
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_7, 0), _fx_catch_6);
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_8, 0), _fx_catch_6);
         fx_str_t slit_3 = FX_MAKE_STR(":");
         fx_str_t slit_4 = FX_MAKE_STR(":");
         fx_str_t slit_5 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
         {
            const fx_str_t strs_0[] = { fname_0, slit_3, v_7, slit_4, v_8, slit_5 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_catch_6);
         }
         FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
         if (all_compile_err_ctx_0 == 0) {
            fx_copy_str(&whole_msg_0, &whole_msg_1);
         }
         else {
            _fx_LS v_14 = 0;
            FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_14), _fx_catch_5);
            fx_str_t slit_6 =
               FX_MAKE_STR("\n"
                  U"\t");
            FX_CALL(_fx_F4joinS2SLS(&slit_6, v_14, &whole_msg_1, 0), _fx_catch_5);

         _fx_catch_5: ;
            if (v_14) {
               _fx_free_LS(&v_14);
            }
         }
         FX_CHECK_EXN(_fx_catch_6);
         FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_9), _fx_catch_6);
         FX_THROW(&v_9, true, _fx_catch_6);
      }
      _fx_R9Ast__id_t rec_0 = { 0, v_10, 0 };
      *fx_result = rec_0;

   _fx_catch_6: ;
      fx_free_exn(&v_9);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_8);
      FX_FREE_STR(&v_7);
      FX_FREE_STR(&fname_0);
      FX_FREE_ARR(&new_data_0);
      FX_FREE_STR(&val0_0);
      FX_FREE_ARR(&old_data_0);
      FX_FREE_ARR(&v_6);
      goto _fx_endmatch_1;
   }
   if (tag_0 == 6) {
      if (v_0->u.TypSInt == 8) {
         fx_exn_t v_15 = {0};
         int_ h_idx_1;
         fx_str_t slit_7 = FX_MAKE_STR("int8");
         FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_7, &h_idx_1, 0),
            _fx_catch_7);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_catch_7);
         int_ idx_1 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data;
         int_ v_16;
         if (idx_1 >= 0) {
            v_16 = idx_1;
         }
         else if (_fx_g19Ast__lock_all_names == 0) {
            int_ idx_2;
            fx_str_t slit_8 = FX_MAKE_STR("int8");
            FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_8, &idx_2, 0), _fx_catch_7);
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_1), _fx_catch_7);
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_1)->data = idx_2;
            v_16 = idx_2;
         }
         else {
            fx_str_t slit_9 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_9, &v_15, 0), _fx_catch_7);
            FX_THROW(&v_15, false, _fx_catch_7);
         }
         _fx_R9Ast__id_t rec_1 = { 0, v_16, 0 };
         *fx_result = rec_1;

      _fx_catch_7: ;
         fx_free_exn(&v_15);
         goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 6) {
      if (v_0->u.TypSInt == 16) {
         fx_exn_t v_17 = {0};
         int_ h_idx_2;
         fx_str_t slit_10 = FX_MAKE_STR("int16");
         FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_10, &h_idx_2, 0),
            _fx_catch_8);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_catch_8);
         int_ idx_3 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data;
         int_ v_18;
         if (idx_3 >= 0) {
            v_18 = idx_3;
         }
         else if (_fx_g19Ast__lock_all_names == 0) {
            int_ idx_4;
            fx_str_t slit_11 = FX_MAKE_STR("int16");
            FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_11, &idx_4, 0), _fx_catch_8);
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_2), _fx_catch_8);
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_2)->data = idx_4;
            v_18 = idx_4;
         }
         else {
            fx_str_t slit_12 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_12, &v_17, 0), _fx_catch_8);
            FX_THROW(&v_17, false, _fx_catch_8);
         }
         _fx_R9Ast__id_t rec_2 = { 0, v_18, 0 };
         *fx_result = rec_2;

      _fx_catch_8: ;
         fx_free_exn(&v_17);
         goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 6) {
      if (v_0->u.TypSInt == 32) {
         fx_exn_t v_19 = {0};
         int_ h_idx_3;
         fx_str_t slit_13 = FX_MAKE_STR("int32");
         FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_13, &h_idx_3, 0),
            _fx_catch_9);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_3), _fx_catch_9);
         int_ idx_5 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_3)->data;
         int_ v_20;
         if (idx_5 >= 0) {
            v_20 = idx_5;
         }
         else if (_fx_g19Ast__lock_all_names == 0) {
            int_ idx_6;
            fx_str_t slit_14 = FX_MAKE_STR("int32");
            FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_14, &idx_6, 0), _fx_catch_9);
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_3), _fx_catch_9);
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_3)->data = idx_6;
            v_20 = idx_6;
         }
         else {
            fx_str_t slit_15 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_15, &v_19, 0), _fx_catch_9);
            FX_THROW(&v_19, false, _fx_catch_9);
         }
         _fx_R9Ast__id_t rec_3 = { 0, v_20, 0 };
         *fx_result = rec_3;

      _fx_catch_9: ;
         fx_free_exn(&v_19);
         goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 6) {
      if (v_0->u.TypSInt == 64) {
         fx_exn_t v_21 = {0};
         int_ h_idx_4;
         fx_str_t slit_16 = FX_MAKE_STR("int64");
         FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_16, &h_idx_4, 0),
            _fx_catch_10);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_4), _fx_catch_10);
         int_ idx_7 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_4)->data;
         int_ v_22;
         if (idx_7 >= 0) {
            v_22 = idx_7;
         }
         else if (_fx_g19Ast__lock_all_names == 0) {
            int_ idx_8;
            fx_str_t slit_17 = FX_MAKE_STR("int64");
            FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_17, &idx_8, 0), _fx_catch_10);
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_4), _fx_catch_10);
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_4)->data = idx_8;
            v_22 = idx_8;
         }
         else {
            fx_str_t slit_18 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_18, &v_21, 0), _fx_catch_10);
            FX_THROW(&v_21, false, _fx_catch_10);
         }
         _fx_R9Ast__id_t rec_4 = { 0, v_22, 0 };
         *fx_result = rec_4;

      _fx_catch_10: ;
         fx_free_exn(&v_21);
         goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 7) {
      if (v_0->u.TypUInt == 8) {
         fx_exn_t v_23 = {0};
         int_ h_idx_5;
         fx_str_t slit_19 = FX_MAKE_STR("uint8");
         FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_19, &h_idx_5, 0),
            _fx_catch_11);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_5), _fx_catch_11);
         int_ idx_9 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_5)->data;
         int_ v_24;
         if (idx_9 >= 0) {
            v_24 = idx_9;
         }
         else if (_fx_g19Ast__lock_all_names == 0) {
            int_ idx_10;
            fx_str_t slit_20 = FX_MAKE_STR("uint8");
            FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_20, &idx_10, 0), _fx_catch_11);
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_5), _fx_catch_11);
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_5)->data = idx_10;
            v_24 = idx_10;
         }
         else {
            fx_str_t slit_21 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_21, &v_23, 0), _fx_catch_11);
            FX_THROW(&v_23, false, _fx_catch_11);
         }
         _fx_R9Ast__id_t rec_5 = { 0, v_24, 0 };
         *fx_result = rec_5;

      _fx_catch_11: ;
         fx_free_exn(&v_23);
         goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 7) {
      if (v_0->u.TypUInt == 16) {
         fx_exn_t v_25 = {0};
         int_ h_idx_6;
         fx_str_t slit_22 = FX_MAKE_STR("uint16");
         FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, &slit_22, &h_idx_6, 0),
            _fx_catch_12);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_6), _fx_catch_12);
         int_ idx_11 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_6)->data;
         int_ v_26;
         if (idx_11 >= 0) {
            v_26 = idx_11;
         }
         else if (_fx_g19Ast__lock_all_names == 0) {
            int_ idx_12;
            fx_str_t slit_23 = FX_MAKE_STR("uint16");
            FX_CALL(_fx_M3AstFM4pushi2Nt9Dynvec__t1SS(_fx_g14Ast__all_names, &slit_23, &idx_12, 0), _fx_catch_12);
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_6), _fx_catch_12);
            FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_6)->data = idx_12;
            v_26 = idx_12;
         }
         else {
            fx_str_t slit_24 = FX_MAKE_STR("\'all_names\' are locked. Attempt to call get_id()");
            FX_CALL(_fx_M3AstFM11compile_errE2RM5loc_tS(&_fx_g10Ast__noloc, &slit_24, &v_25, 0), _fx_catch_12);
            FX_THROW(&v_25, false, _fx_catch_12);
         }
         _fx_R9Ast__id_t rec_6 = { 0, v_26, 0 };
         *fx_result = rec_6;

      _fx_catch_12: ;
         fx_free_exn(&v_25);
         goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 7) {
      if (v_0->u.TypUInt == 32) {
         FX_CALL(_fx_M3AstFM15fname_to_uint32RM4id_t0(fx_result, 0), _fx_catch_13);  _fx_catch_13: ; goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 7) {
      if (v_0->u.TypUInt == 64) {
         FX_CALL(_fx_M3AstFM15fname_to_uint64RM4id_t0(fx_result, 0), _fx_catch_14);  _fx_catch_14: ; goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 9) {
      if (v_0->u.TypFloat == 32) {
         FX_CALL(_fx_M3AstFM14fname_to_floatRM4id_t0(fx_result, 0), _fx_catch_15);  _fx_catch_15: ; goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 9) {
      if (v_0->u.TypFloat == 64) {
         FX_CALL(_fx_M3AstFM15fname_to_doubleRM4id_t0(fx_result, 0), _fx_catch_16);  _fx_catch_16: ; goto _fx_endmatch_1;
      }
   }
   if (tag_0 == 12) {
      FX_CALL(_fx_M3AstFM13fname_to_boolRM4id_t0(fx_result, 0), _fx_catch_17);  _fx_catch_17: ; goto _fx_endmatch_1;
   }
   if (tag_0 == 10) {
      FX_CALL(_fx_M3AstFM12fname_stringRM4id_t0(fx_result, 0), _fx_catch_18);  _fx_catch_18: ; goto _fx_endmatch_1;
   }
   fx_str_t v_27 = {0};
   fx_str_t v_28 = {0};
   fx_exn_t v_29 = {0};
   FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_0, &v_27, 0), _fx_catch_19);
   fx_str_t slit_25 = FX_MAKE_STR("for type \'");
   fx_str_t slit_26 = FX_MAKE_STR("\' there is no corresponding cast function");
   {
      const fx_str_t strs_1[] = { slit_25, v_27, slit_26 };
      FX_CALL(fx_strjoin(0, 0, 0, strs_1, 3, &v_28), _fx_catch_19);
   }
   FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &v_28, &v_29), _fx_catch_19);
   FX_THROW(&v_29, true, _fx_catch_19);

_fx_catch_19: ;
   fx_free_exn(&v_29);
   FX_FREE_STR(&v_28);
   FX_FREE_STR(&v_27);

_fx_endmatch_1: ;

_fx_cleanup: ;
   if (v_0) {
      _fx_free_N10Ast__typ_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14is_constructorB1RM11fun_flags_t(
   struct _fx_R16Ast__fun_flags_t* flags_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_N17Ast__fun_constr_t v_0 = flags_0->fun_flag_ctor;
   if (v_0.tag == 1) {
      *fx_result = false;
   }
   else {
      *fx_result = true;
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8ctor2strS1N17Ast__fun_constr_t(
   struct _fx_N17Ast__fun_constr_t* f_0,
   fx_str_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = f_0->tag;
   if (tag_0 == 1) {
      fx_str_t slit_0 = FX_MAKE_STR("not_a_constructor"); fx_copy_str(&slit_0, fx_result);
   }
   else if (tag_0 == 2) {
      fx_str_t slit_1 = FX_MAKE_STR("Constructor(record_or_tuple)"); fx_copy_str(&slit_1, fx_result);
   }
   else if (tag_0 == 3) {
      fx_str_t v_0 = {0};
      FX_CALL(_fx_F6stringS1i(f_0->u.CtorVariant, &v_0, 0), _fx_catch_0);
      fx_str_t slit_2 = FX_MAKE_STR("Constructor(variant(");
      fx_str_t slit_3 = FX_MAKE_STR("))");
      {
         const fx_str_t strs_0[] = { slit_2, v_0, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, fx_result), _fx_catch_0);
      }

   _fx_catch_0: ;
      FX_FREE_STR(&v_0);
   }
   else if (tag_0 == 4) {
      fx_str_t v_1 = {0};
      fx_str_t prefix_0 = {0};
      fx_str_t v_2 = {0};
      _fx_R9Ast__id_t* i_0 = &f_0->u.CtorFP;
      bool t_0;
      if ((bool)((i_0->m == _fx_g9Ast__noid.m) & (i_0->i == _fx_g9Ast__noid.i))) {
         t_0 = (bool)((i_0->m == 0) | (i_0->j == _fx_g9Ast__noid.j));
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         fx_str_t slit_4 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_4, &v_1);
      }
      else {
         int_ v_3 = i_0->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_3), _fx_catch_1);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_3), &prefix_0);
         if (i_0->m == 0) {
            fx_copy_str(&prefix_0, &v_1);
         }
         else {
            FX_CALL(_fx_F6stringS1i(i_0->j, &v_2, 0), _fx_catch_1);
            fx_str_t slit_5 = FX_MAKE_STR("@");
            {
               const fx_str_t strs_1[] = { prefix_0, slit_5, v_2 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_1, 3, &v_1), _fx_catch_1);
            }
         }
      }
      fx_str_t slit_6 = FX_MAKE_STR("Constructor(fp(");
      fx_str_t slit_7 = FX_MAKE_STR("))");
      {
         const fx_str_t strs_2[] = { slit_6, v_1, slit_7 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_2, 3, fx_result), _fx_catch_1);
      }

   _fx_catch_1: ;
      FX_FREE_STR(&v_2);
      FX_FREE_STR(&prefix_0);
      FX_FREE_STR(&v_1);
   }
   else if (tag_0 == 5) {
      fx_str_t v_4 = {0};
      fx_str_t prefix_1 = {0};
      fx_str_t v_5 = {0};
      _fx_R9Ast__id_t* i_1 = &f_0->u.CtorExn;
      bool t_1;
      if ((bool)((i_1->m == _fx_g9Ast__noid.m) & (i_1->i == _fx_g9Ast__noid.i))) {
         t_1 = (bool)((i_1->m == 0) | (i_1->j == _fx_g9Ast__noid.j));
      }
      else {
         t_1 = false;
      }
      if (t_1) {
         fx_str_t slit_8 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_8, &v_4);
      }
      else {
         int_ v_6 = i_1->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_6), _fx_catch_2);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_6), &prefix_1);
         if (i_1->m == 0) {
            fx_copy_str(&prefix_1, &v_4);
         }
         else {
            FX_CALL(_fx_F6stringS1i(i_1->j, &v_5, 0), _fx_catch_2);
            fx_str_t slit_9 = FX_MAKE_STR("@");
            {
               const fx_str_t strs_3[] = { prefix_1, slit_9, v_5 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_3, 3, &v_4), _fx_catch_2);
            }
         }
      }
      fx_str_t slit_10 = FX_MAKE_STR("Constructor(exn(");
      fx_str_t slit_11 = FX_MAKE_STR("))");
      {
         const fx_str_t strs_4[] = { slit_10, v_4, slit_11 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_4, 3, fx_result), _fx_catch_2);
      }

   _fx_catch_2: ;
      FX_FREE_STR(&v_5);
      FX_FREE_STR(&prefix_1);
      FX_FREE_STR(&v_4);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7lit2strS1N10Ast__lit_t(struct _fx_N10Ast__lit_t* c_0, fx_str_t* fx_result, void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = c_0->tag;
   if (tag_0 == 1) {
      FX_CALL(_fx_F6stringS1l(c_0->u.LitInt, fx_result, 0), _fx_catch_0);  _fx_catch_0: ; goto _fx_endmatch_0;
   }
   if (tag_0 == 2) {
      _fx_T2il* vcase_0 = &c_0->u.LitSInt;
      if (vcase_0->t0 == 64) {
         fx_str_t v_0 = {0};
         FX_CALL(_fx_F6stringS1l(vcase_0->t1, &v_0, 0), _fx_catch_1);
         fx_str_t slit_0 = FX_MAKE_STR("L");
         {
            const fx_str_t strs_0[] = { v_0, slit_0 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 2, fx_result), _fx_catch_1);
         }

      _fx_catch_1: ;
         FX_FREE_STR(&v_0);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 3) {
      _fx_T2iq* vcase_1 = &c_0->u.LitUInt;
      if (vcase_1->t0 == 64) {
         fx_str_t v_1 = {0};
         FX_CALL(_fx_F6stringS1q(vcase_1->t1, &v_1, 0), _fx_catch_2);
         fx_str_t slit_1 = FX_MAKE_STR("UL");
         {
            const fx_str_t strs_1[] = { v_1, slit_1 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_1, 2, fx_result), _fx_catch_2);
         }

      _fx_catch_2: ;
         FX_FREE_STR(&v_1);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 2) {
      fx_str_t v_2 = {0};
      fx_str_t v_3 = {0};
      _fx_T2il* vcase_2 = &c_0->u.LitSInt;
      FX_CALL(_fx_F6stringS1l(vcase_2->t1, &v_2, 0), _fx_catch_3);
      FX_CALL(_fx_F6stringS1i(vcase_2->t0, &v_3, 0), _fx_catch_3);
      fx_str_t slit_2 = FX_MAKE_STR("i");
      {
         const fx_str_t strs_2[] = { v_2, slit_2, v_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_2, 3, fx_result), _fx_catch_3);
      }

   _fx_catch_3: ;
      FX_FREE_STR(&v_3);
      FX_FREE_STR(&v_2);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 3) {
      fx_str_t v_4 = {0};
      fx_str_t v_5 = {0};
      _fx_T2iq* vcase_3 = &c_0->u.LitUInt;
      FX_CALL(_fx_F6stringS1q(vcase_3->t1, &v_4, 0), _fx_catch_4);
      FX_CALL(_fx_F6stringS1i(vcase_3->t0, &v_5, 0), _fx_catch_4);
      fx_str_t slit_3 = FX_MAKE_STR("u");
      {
         const fx_str_t strs_3[] = { v_4, slit_3, v_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_3, 3, fx_result), _fx_catch_4);
      }

   _fx_catch_4: ;
      FX_FREE_STR(&v_5);
      FX_FREE_STR(&v_4);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 4) {
      _fx_T2id* vcase_4 = &c_0->u.LitFloat;
      if (vcase_4->t0 == 16) {
         fx_str_t v_6 = {0};
         FX_CALL(_fx_F6stringS1f((float)vcase_4->t1, &v_6, 0), _fx_catch_5);
         bool v_7;
         if (_fx_M6StringFM8containsB2SC(&v_6, (char_)46, 0)) {
            v_7 = true;
         }
         else {
            v_7 = _fx_M6StringFM8containsB2SC(&v_6, (char_)101, 0);
         }
         if (v_7) {
            fx_str_t slit_4 = FX_MAKE_STR("h");
            {
               const fx_str_t strs_4[] = { v_6, slit_4 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_4, 2, fx_result), _fx_catch_5);
            }
         }
         else {
            fx_str_t slit_5 = FX_MAKE_STR(".h");
            {
               const fx_str_t strs_5[] = { v_6, slit_5 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_5, 2, fx_result), _fx_catch_5);
            }
         }

      _fx_catch_5: ;
         FX_FREE_STR(&v_6);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 4) {
      _fx_T2id* vcase_5 = &c_0->u.LitFloat;
      if (vcase_5->t0 == 32) {
         fx_str_t v_8 = {0};
         FX_CALL(_fx_F6stringS1f((float)vcase_5->t1, &v_8, 0), _fx_catch_6);
         bool v_9;
         if (_fx_M6StringFM8containsB2SC(&v_8, (char_)46, 0)) {
            v_9 = true;
         }
         else {
            v_9 = _fx_M6StringFM8containsB2SC(&v_8, (char_)101, 0);
         }
         if (v_9) {
            fx_str_t slit_6 = FX_MAKE_STR("f");
            {
               const fx_str_t strs_6[] = { v_8, slit_6 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_6, 2, fx_result), _fx_catch_6);
            }
         }
         else {
            fx_str_t slit_7 = FX_MAKE_STR(".f");
            {
               const fx_str_t strs_7[] = { v_8, slit_7 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_7, 2, fx_result), _fx_catch_6);
            }
         }

      _fx_catch_6: ;
         FX_FREE_STR(&v_8);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 4) {
      fx_str_t v_10 = {0};
      FX_CALL(_fx_F6stringS1d(c_0->u.LitFloat.t1, &v_10, 0), _fx_catch_7);
      bool v_11;
      if (_fx_M6StringFM8containsB2SC(&v_10, (char_)46, 0)) {
         v_11 = true;
      }
      else {
         v_11 = _fx_M6StringFM8containsB2SC(&v_10, (char_)101, 0);
      }
      if (v_11) {
         fx_copy_str(&v_10, fx_result);
      }
      else {
         fx_str_t slit_8 = FX_MAKE_STR(".");
         {
            const fx_str_t strs_8[] = { v_10, slit_8 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_8, 2, fx_result), _fx_catch_7);
         }
      }

   _fx_catch_7: ;
      FX_FREE_STR(&v_10);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 5) {
      FX_CALL(_fx_M6StringFM7escapedS2SB(&c_0->u.LitString, true, fx_result, 0), _fx_catch_8);

   _fx_catch_8: ;
      goto _fx_endmatch_0;
   }
   if (tag_0 == 6) {
      fx_str_t v_12 = {0};
      fx_str_t v_13 = {0};
      FX_CALL(_fx_F6stringS1C(c_0->u.LitChar, &v_12, 0), _fx_catch_9);
      FX_CALL(_fx_M6StringFM7escapedS2SB(&v_12, false, &v_13, 0), _fx_catch_9);
      fx_str_t slit_9 = FX_MAKE_STR("\'");
      fx_str_t slit_10 = FX_MAKE_STR("\'");
      {
         const fx_str_t strs_9[] = { slit_9, v_13, slit_10 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_9, 3, fx_result), _fx_catch_9);
      }

   _fx_catch_9: ;
      FX_FREE_STR(&v_13);
      FX_FREE_STR(&v_12);
      goto _fx_endmatch_0;
   }
   if (tag_0 == 7) {
      if (c_0->u.LitBool == true) {
         fx_str_t slit_11 = FX_MAKE_STR("true"); fx_copy_str(&slit_11, fx_result); goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 7) {
      if (c_0->u.LitBool == false) {
         fx_str_t slit_12 = FX_MAKE_STR("false"); fx_copy_str(&slit_12, fx_result); goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 8) {
      fx_str_t slit_13 = FX_MAKE_STR("[]"); fx_copy_str(&slit_13, fx_result); goto _fx_endmatch_0;
   }
   if (tag_0 == 9) {
      fx_str_t slit_14 = FX_MAKE_STR("null"); fx_copy_str(&slit_14, fx_result); goto _fx_endmatch_0;
   }
   FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7typ2strS1N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t* t_0, fx_str_t* fx_result, void* fx_fv)
{
   fx_str_t result_0 = {0};
   _fx_N10Ast__typ_t t_1 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(t_0, &t_1);
   for (;;) {
      _fx_N10Ast__typ_t t_2 = 0;
      _fx_Nt6option1N10Ast__typ_t v_0 = 0;
      FX_COPY_PTR(t_1, &t_2);
      int tag_0 = FX_REC_VARIANT_TAG(t_2);
      if (tag_0 == 2) {
         _fx_Nt6option1N10Ast__typ_t v_1 = t_2->u.TypVarTuple;
         if ((v_1 != 0) + 1 == 2) {
            fx_str_t v_2 = {0};
            fx_str_t result_1 = {0};
            FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(v_1->u.Some, &v_2, 0), _fx_catch_0);
            fx_str_t slit_0 = FX_MAKE_STR("(");
            fx_str_t slit_1 = FX_MAKE_STR(" ...)");
            {
               const fx_str_t strs_0[] = { slit_0, v_2, slit_1 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_0, 3, &result_1), _fx_catch_0);
            }
            FX_FREE_STR(&result_0);
            fx_copy_str(&result_1, &result_0);
            FX_BREAK(_fx_catch_0);

         _fx_catch_0: ;
            FX_FREE_STR(&result_1);
            FX_FREE_STR(&v_2);
            goto _fx_endmatch_1;
         }
      }
      if (tag_0 == 2) {
         fx_str_t slit_2 = FX_MAKE_STR("(...)");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_2, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 3) {
         fx_str_t v_3 = {0};
         fx_str_t result_2 = {0};
         FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_2->u.TypVarArray, &v_3, 0), _fx_catch_2);
         fx_str_t slit_3 = FX_MAKE_STR(" [+]");
         {
            const fx_str_t strs_1[] = { v_3, slit_3 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_1, 2, &result_2), _fx_catch_2);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_2, &result_0);
         FX_BREAK(_fx_catch_2);

      _fx_catch_2: ;
         FX_FREE_STR(&result_2);
         FX_FREE_STR(&v_3);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 4) {
         fx_str_t slit_4 = FX_MAKE_STR("{...}");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_4, &result_0);
         FX_BREAK(_fx_catch_3);

      _fx_catch_3: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 1) {
         FX_COPY_PTR(t_2->u.TypVar->data, &v_0);
         if ((v_0 != 0) + 1 == 2) {
            _fx_N10Ast__typ_t* t_3 = &v_0->u.Some; _fx_free_N10Ast__typ_t(&t_1); FX_COPY_PTR(*t_3, &t_1); goto _fx_endmatch_1;
         }
      }
      if (tag_0 == 1) {
         fx_str_t slit_5 = FX_MAKE_STR("<unknown>");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_5, &result_0);
         FX_BREAK(_fx_catch_4);

      _fx_catch_4: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 24) {
         _fx_T2LN10Ast__typ_tR9Ast__id_t* vcase_0 = &t_2->u.TypApp;
         if (vcase_0->t0 == 0) {
            fx_str_t result_3 = {0};
            FX_CALL(_fx_M3AstFM8id2str_mS1RM4id_t(&vcase_0->t1, &result_3, 0), _fx_catch_5);
            FX_FREE_STR(&result_0);
            fx_copy_str(&result_3, &result_0);
            FX_BREAK(_fx_catch_5);

         _fx_catch_5: ;
            FX_FREE_STR(&result_3);
            goto _fx_endmatch_1;
         }
      }
      if (tag_0 == 24) {
         fx_str_t v_4 = {0};
         fx_str_t v_5 = {0};
         fx_str_t result_4 = {0};
         _fx_T2LN10Ast__typ_tR9Ast__id_t* vcase_1 = &t_2->u.TypApp;
         FX_CALL(_fx_M3AstFM6tl2strS1LN10Ast__typ_t(vcase_1->t0, &v_4, 0), _fx_catch_6);
         FX_CALL(_fx_M3AstFM8id2str_mS1RM4id_t(&vcase_1->t1, &v_5, 0), _fx_catch_6);
         fx_str_t slit_6 = FX_MAKE_STR(" ");
         {
            const fx_str_t strs_2[] = { v_4, slit_6, v_5 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_2, 3, &result_4), _fx_catch_6);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_4, &result_0);
         FX_BREAK(_fx_catch_6);

      _fx_catch_6: ;
         FX_FREE_STR(&result_4);
         FX_FREE_STR(&v_5);
         FX_FREE_STR(&v_4);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 5) {
         fx_str_t slit_7 = FX_MAKE_STR("int");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_7, &result_0);
         FX_BREAK(_fx_catch_7);

      _fx_catch_7: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 8) {
         fx_str_t slit_8 = FX_MAKE_STR("long");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_8, &result_0);
         FX_BREAK(_fx_catch_8);

      _fx_catch_8: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 6) {
         fx_str_t v_6 = {0};
         fx_str_t result_5 = {0};
         FX_CALL(_fx_F6stringS1i(t_2->u.TypSInt, &v_6, 0), _fx_catch_9);
         fx_str_t slit_9 = FX_MAKE_STR("int");
         {
            const fx_str_t strs_3[] = { slit_9, v_6 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_3, 2, &result_5), _fx_catch_9);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_5, &result_0);
         FX_BREAK(_fx_catch_9);

      _fx_catch_9: ;
         FX_FREE_STR(&result_5);
         FX_FREE_STR(&v_6);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 7) {
         fx_str_t v_7 = {0};
         fx_str_t result_6 = {0};
         FX_CALL(_fx_F6stringS1i(t_2->u.TypUInt, &v_7, 0), _fx_catch_10);
         fx_str_t slit_10 = FX_MAKE_STR("uint");
         {
            const fx_str_t strs_4[] = { slit_10, v_7 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_4, 2, &result_6), _fx_catch_10);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_6, &result_0);
         FX_BREAK(_fx_catch_10);

      _fx_catch_10: ;
         FX_FREE_STR(&result_6);
         FX_FREE_STR(&v_7);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 9) {
         int_ n_0 = t_2->u.TypFloat;
         if (n_0 == 16) {
            fx_str_t slit_11 = FX_MAKE_STR("half");
            FX_FREE_STR(&result_0);
            fx_copy_str(&slit_11, &result_0);
            FX_BREAK(_fx_catch_11);

         _fx_catch_11: ;
         }
         else if (n_0 == 32) {
            fx_str_t slit_12 = FX_MAKE_STR("float");
            FX_FREE_STR(&result_0);
            fx_copy_str(&slit_12, &result_0);
            FX_BREAK(_fx_catch_12);

         _fx_catch_12: ;
         }
         else if (n_0 == 64) {
            fx_str_t slit_13 = FX_MAKE_STR("double");
            FX_FREE_STR(&result_0);
            fx_copy_str(&slit_13, &result_0);
            FX_BREAK(_fx_catch_13);

         _fx_catch_13: ;
         }
         else {
            fx_str_t v_8 = {0};
            fx_str_t fname_0 = {0};
            fx_str_t v_9 = {0};
            fx_str_t v_10 = {0};
            fx_str_t whole_msg_0 = {0};
            _fx_LS all_compile_err_ctx_0 = 0;
            fx_str_t whole_msg_1 = {0};
            fx_exn_t v_11 = {0};
            FX_CALL(_fx_F6stringS1i(n_0, &v_8, 0), _fx_catch_15);
            if (_fx_g10Ast__noloc.m_idx >= 0) {
               int_ v_12 = _fx_g10Ast__noloc.m_idx;
               FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_12), _fx_catch_15);
               fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_12))->u.defmodule_t.t1, &fname_0);
            }
            else {
               fx_str_t slit_14 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_14, &fname_0);
            }
            FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_9, 0), _fx_catch_15);
            FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_10, 0), _fx_catch_15);
            fx_str_t slit_15 = FX_MAKE_STR(":");
            fx_str_t slit_16 = FX_MAKE_STR(":");
            fx_str_t slit_17 = FX_MAKE_STR(": error: bad floating-point type TypFloat(");
            fx_str_t slit_18 = FX_MAKE_STR(")");
            {
               const fx_str_t strs_5[] = { fname_0, slit_15, v_9, slit_16, v_10, slit_17, v_8, slit_18 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_5, 8, &whole_msg_0), _fx_catch_15);
            }
            FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
            if (all_compile_err_ctx_0 == 0) {
               fx_copy_str(&whole_msg_0, &whole_msg_1);
            }
            else {
               _fx_LS v_13 = 0;
               FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_13), _fx_catch_14);
               fx_str_t slit_19 =
                  FX_MAKE_STR("\n"
                     U"\t");
               FX_CALL(_fx_F4joinS2SLS(&slit_19, v_13, &whole_msg_1, 0), _fx_catch_14);

            _fx_catch_14: ;
               if (v_13) {
                  _fx_free_LS(&v_13);
               }
            }
            FX_CHECK_EXN(_fx_catch_15);
            FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_11), _fx_catch_15);
            FX_THROW(&v_11, true, _fx_catch_15);

         _fx_catch_15: ;
            fx_free_exn(&v_11);
            FX_FREE_STR(&whole_msg_1);
            if (all_compile_err_ctx_0) {
               _fx_free_LS(&all_compile_err_ctx_0);
            }
            FX_FREE_STR(&whole_msg_0);
            FX_FREE_STR(&v_10);
            FX_FREE_STR(&v_9);
            FX_FREE_STR(&fname_0);
            FX_FREE_STR(&v_8);
         }
         FX_CHECK_EXN(_fx_catch_16);

      _fx_catch_16: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 13) {
         fx_str_t slit_20 = FX_MAKE_STR("void");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_20, &result_0);
         FX_BREAK(_fx_catch_17);

      _fx_catch_17: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 12) {
         fx_str_t slit_21 = FX_MAKE_STR("bool");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_21, &result_0);
         FX_BREAK(_fx_catch_18);

      _fx_catch_18: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 11) {
         fx_str_t slit_22 = FX_MAKE_STR("char");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_22, &result_0);
         FX_BREAK(_fx_catch_19);

      _fx_catch_19: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 10) {
         fx_str_t slit_23 = FX_MAKE_STR("string");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_23, &result_0);
         FX_BREAK(_fx_catch_20);

      _fx_catch_20: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 23) {
         fx_str_t slit_24 = FX_MAKE_STR("cptr");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_24, &result_0);
         FX_BREAK(_fx_catch_21);

      _fx_catch_21: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 14) {
         fx_str_t v_14 = {0};
         fx_str_t v_15 = {0};
         fx_str_t result_7 = {0};
         _fx_T2LN10Ast__typ_tN10Ast__typ_t* vcase_2 = &t_2->u.TypFun;
         FX_CALL(_fx_M3AstFM6tl2strS1LN10Ast__typ_t(vcase_2->t0, &v_14, 0), _fx_catch_22);
         FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(vcase_2->t1, &v_15, 0), _fx_catch_22);
         fx_str_t slit_25 = FX_MAKE_STR("(");
         fx_str_t slit_26 = FX_MAKE_STR(" -> ");
         fx_str_t slit_27 = FX_MAKE_STR(")");
         {
            const fx_str_t strs_6[] = { slit_25, v_14, slit_26, v_15, slit_27 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_6, 5, &result_7), _fx_catch_22);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_7, &result_0);
         FX_BREAK(_fx_catch_22);

      _fx_catch_22: ;
         FX_FREE_STR(&result_7);
         FX_FREE_STR(&v_15);
         FX_FREE_STR(&v_14);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 17) {
         fx_str_t s_0 = {0};
         _fx_LN10Ast__typ_t tl_0 = t_2->u.TypTuple;
         FX_CALL(_fx_M3AstFM6tl2strS1LN10Ast__typ_t(tl_0, &s_0, 0), _fx_catch_25);
         if (tl_0 != 0) {
            if (tl_0->tl == 0) {
               fx_str_t result_8 = {0};
               fx_str_t slit_28 = FX_MAKE_STR("(");
               fx_str_t slit_29 = FX_MAKE_STR(",)");
               {
                  const fx_str_t strs_7[] = { slit_28, s_0, slit_29 };
                  FX_CALL(fx_strjoin(0, 0, 0, strs_7, 3, &result_8), _fx_catch_23);
               }
               FX_FREE_STR(&result_0);
               fx_copy_str(&result_8, &result_0);
               FX_BREAK(_fx_catch_23);

            _fx_catch_23: ;
               FX_FREE_STR(&result_8);
               goto _fx_endmatch_0;
            }
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&s_0, &result_0);
         FX_BREAK(_fx_catch_24);

      _fx_catch_24: ;

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_catch_25);

      _fx_catch_25: ;
         FX_FREE_STR(&s_0);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 20) {
         _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB v_16 = {0};
         fx_arr_t v_17 = {0};
         _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t relems_0 = 0;
         fx_str_t result_9 = {0};
         _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&t_2->u.TypRecord->data, &v_16);
         fx_str_t* dstptr_0 = 0;
         FX_COPY_PTR(v_16.t0, &relems_0);
         _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t lst_0 = relems_0;
         int_ len_0 = fx_list_length(lst_0);
         {
            const int_ shape_0[] = { len_0 };
            FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &v_17),
               _fx_catch_27);
         }
         dstptr_0 = (fx_str_t*)v_17.data;
         for (; lst_0; lst_0 = lst_0->tl, dstptr_0++) {
            _fx_R16Ast__val_flags_t flags_0 = {0};
            _fx_N10Ast__typ_t t_4 = 0;
            fx_str_t prefix_0 = {0};
            fx_str_t v_18 = {0};
            fx_str_t prefix_1 = {0};
            fx_str_t v_19 = {0};
            fx_str_t v_20 = {0};
            fx_str_t concat_str_0 = {0};
            _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* __pat___0 = &lst_0->hd;
            _fx_copy_R16Ast__val_flags_t(&__pat___0->t0, &flags_0);
            _fx_R9Ast__id_t i_0 = __pat___0->t1;
            FX_COPY_PTR(__pat___0->t2, &t_4);
            if (flags_0.val_flag_mutable) {
               fx_str_t slit_30 = FX_MAKE_STR("var "); fx_copy_str(&slit_30, &prefix_0);
            }
            else {
               fx_str_t slit_31 = FX_MAKE_STR(""); fx_copy_str(&slit_31, &prefix_0);
            }
            bool t_5;
            if ((bool)((i_0.m == _fx_g9Ast__noid.m) & (i_0.i == _fx_g9Ast__noid.i))) {
               t_5 = (bool)((i_0.m == 0) | (i_0.j == _fx_g9Ast__noid.j));
            }
            else {
               t_5 = false;
            }
            if (t_5) {
               fx_str_t slit_32 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_32, &v_18);
            }
            else {
               int_ v_21 = i_0.i;
               FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_21), _fx_catch_26);
               fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_21), &prefix_1);
               if (i_0.m == 0) {
                  fx_copy_str(&prefix_1, &v_18);
               }
               else {
                  FX_CALL(_fx_F6stringS1i(i_0.j, &v_19, 0), _fx_catch_26);
                  fx_str_t slit_33 = FX_MAKE_STR("@");
                  {
                     const fx_str_t strs_8[] = { prefix_1, slit_33, v_19 };
                     FX_CALL(fx_strjoin(0, 0, 0, strs_8, 3, &v_18), _fx_catch_26);
                  }
               }
            }
            FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_4, &v_20, 0), _fx_catch_26);
            fx_str_t slit_34 = FX_MAKE_STR(": ");
            {
               const fx_str_t strs_9[] = { prefix_0, v_18, slit_34, v_20 };
               FX_CALL(fx_strjoin(0, 0, 0, strs_9, 4, &concat_str_0), _fx_catch_26);
            }
            fx_copy_str(&concat_str_0, dstptr_0);

         _fx_catch_26: ;
            FX_FREE_STR(&concat_str_0);
            FX_FREE_STR(&v_20);
            FX_FREE_STR(&v_19);
            FX_FREE_STR(&prefix_1);
            FX_FREE_STR(&v_18);
            FX_FREE_STR(&prefix_0);
            if (t_4) {
               _fx_free_N10Ast__typ_t(&t_4);
            }
            _fx_free_R16Ast__val_flags_t(&flags_0);
            FX_CHECK_EXN(_fx_catch_27);
         }
         fx_str_t slit_35 = FX_MAKE_STR("{");
         fx_str_t slit_36 = FX_MAKE_STR("}");
         fx_str_t slit_37 = FX_MAKE_STR("; ");
         FX_CALL(_fx_F12join_embraceS4SSSA1S(&slit_35, &slit_36, &slit_37, &v_17, &result_9, 0), _fx_catch_27);
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_9, &result_0);
         FX_BREAK(_fx_catch_27);

      _fx_catch_27: ;
         FX_FREE_STR(&result_9);
         if (relems_0) {
            _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&relems_0);
         }
         FX_FREE_ARR(&v_17);
         _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_16);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 19) {
         fx_str_t v_22 = {0};
         fx_str_t v_23 = {0};
         fx_str_t result_10 = {0};
         _fx_T2iN10Ast__typ_t* vcase_3 = &t_2->u.TypArray;
         FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(vcase_3->t1, &v_22, 0), _fx_catch_28);
         FX_CALL(_fx_F7__mul__S2Ci((char_)44, vcase_3->t0 - 1, &v_23, 0), _fx_catch_28);
         fx_str_t slit_38 = FX_MAKE_STR(" [");
         fx_str_t slit_39 = FX_MAKE_STR("]");
         {
            const fx_str_t strs_10[] = { v_22, slit_38, v_23, slit_39 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_10, 4, &result_10), _fx_catch_28);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_10, &result_0);
         FX_BREAK(_fx_catch_28);

      _fx_catch_28: ;
         FX_FREE_STR(&result_10);
         FX_FREE_STR(&v_23);
         FX_FREE_STR(&v_22);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 15) {
         fx_str_t v_24 = {0};
         fx_str_t result_11 = {0};
         FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_2->u.TypList, &v_24, 0), _fx_catch_29);
         fx_str_t slit_40 = FX_MAKE_STR(" list");
         {
            const fx_str_t strs_11[] = { v_24, slit_40 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_11, 2, &result_11), _fx_catch_29);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_11, &result_0);
         FX_BREAK(_fx_catch_29);

      _fx_catch_29: ;
         FX_FREE_STR(&result_11);
         FX_FREE_STR(&v_24);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 16) {
         fx_str_t v_25 = {0};
         fx_str_t result_12 = {0};
         FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_2->u.TypVector, &v_25, 0), _fx_catch_30);
         fx_str_t slit_41 = FX_MAKE_STR(" vector");
         {
            const fx_str_t strs_12[] = { v_25, slit_41 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_12, 2, &result_12), _fx_catch_30);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_12, &result_0);
         FX_BREAK(_fx_catch_30);

      _fx_catch_30: ;
         FX_FREE_STR(&result_12);
         FX_FREE_STR(&v_25);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 18) {
         fx_str_t v_26 = {0};
         fx_str_t result_13 = {0};
         FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_2->u.TypRef, &v_26, 0), _fx_catch_31);
         fx_str_t slit_42 = FX_MAKE_STR(" ref");
         {
            const fx_str_t strs_13[] = { v_26, slit_42 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_13, 2, &result_13), _fx_catch_31);
         }
         FX_FREE_STR(&result_0);
         fx_copy_str(&result_13, &result_0);
         FX_BREAK(_fx_catch_31);

      _fx_catch_31: ;
         FX_FREE_STR(&result_13);
         FX_FREE_STR(&v_26);
         goto _fx_endmatch_1;
      }
      if (tag_0 == 21) {
         fx_str_t slit_43 = FX_MAKE_STR("exn");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_43, &result_0);
         FX_BREAK(_fx_catch_32);

      _fx_catch_32: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 22) {
         fx_str_t slit_44 = FX_MAKE_STR("<err>");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_44, &result_0);
         FX_BREAK(_fx_catch_33);

      _fx_catch_33: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 25) {
         fx_str_t slit_45 = FX_MAKE_STR("<decl>");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_45, &result_0);
         FX_BREAK(_fx_catch_34);

      _fx_catch_34: ;
         goto _fx_endmatch_1;
      }
      if (tag_0 == 26) {
         fx_str_t slit_46 = FX_MAKE_STR("<module>");
         FX_FREE_STR(&result_0);
         fx_copy_str(&slit_46, &result_0);
         FX_BREAK(_fx_catch_35);

      _fx_catch_35: ;
         goto _fx_endmatch_1;
      }
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_36);

   _fx_endmatch_1: ;
      FX_CHECK_EXN(_fx_catch_36);

   _fx_catch_36: ;
      if (v_0) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_0);
      }
      if (t_2) {
         _fx_free_N10Ast__typ_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_copy_str(&result_0, fx_result);

_fx_cleanup: ;
   FX_FREE_STR(&result_0);
   if (t_1) {
      _fx_free_N10Ast__typ_t(&t_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM6tl2strS1LN10Ast__typ_t(struct _fx_LN10Ast__typ_t_data_t* tl_0, fx_str_t* fx_result, void* fx_fv)
{
   _fx_Ta2S v_0 = {0};
   fx_str_t begin_0 = {0};
   fx_str_t end_0 = {0};
   fx_arr_t v_1 = {0};
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   if (tl_0 != 0) {
      if (tl_0->tl == 0) {
         fx_str_t slit_0 = FX_MAKE_STR("");
         fx_str_t slit_1 = FX_MAKE_STR("");
         _fx_make_Ta2S(&slit_0, &slit_1, &v_0);
         goto _fx_endmatch_0;
      }
   }
   fx_str_t slit_2 = FX_MAKE_STR("(");
   fx_str_t slit_3 = FX_MAKE_STR(")");
   _fx_make_Ta2S(&slit_2, &slit_3, &v_0);

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   fx_copy_str(&v_0.t0, &begin_0);
   fx_copy_str(&v_0.t1, &end_0);
   fx_str_t* dstptr_0 = 0;
   _fx_LN10Ast__typ_t lst_0 = tl_0;
   int_ len_0 = fx_list_length(lst_0);
   {
      const int_ shape_0[] = { len_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (fx_str_t*)v_1.data;
   for (; lst_0; lst_0 = lst_0->tl, dstptr_0++) {
      fx_str_t res_0 = {0};
      _fx_N10Ast__typ_t t_0 = lst_0->hd;
      FX_CALL(_fx_M3AstFM7typ2strS1N10Ast__typ_t(t_0, &res_0, 0), _fx_catch_0);
      fx_copy_str(&res_0, dstptr_0);

   _fx_catch_0: ;
      FX_FREE_STR(&res_0);
      FX_CHECK_EXN(_fx_cleanup);
   }
   fx_str_t slit_4 = FX_MAKE_STR(", ");
   FX_CALL(_fx_F12join_embraceS4SSSA1S(&begin_0, &end_0, &slit_4, &v_1, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_Ta2S(&v_0);
   FX_FREE_STR(&begin_0);
   FX_FREE_STR(&end_0);
   FX_FREE_ARR(&v_1);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM5parseRM9pragmas_t2LT2SRM5loc_tRM9pragmas_t(
   struct _fx_LT2SR10Ast__loc_t_data_t* prl_0,
   struct _fx_R14Ast__pragmas_t* result_0,
   struct _fx_R14Ast__pragmas_t* fx_result,
   void* fx_fv)
{
   _fx_R14Ast__pragmas_t result_1 = {0};
   _fx_LT2SR10Ast__loc_t prl_1 = 0;
   _fx_R14Ast__pragmas_t result_2 = {0};
   int fx_status = 0;
   FX_COPY_PTR(prl_0, &prl_1);
   _fx_copy_R14Ast__pragmas_t(result_0, &result_2);
   for (;;) {
      _fx_LT2SR10Ast__loc_t prl_2 = 0;
      _fx_R14Ast__pragmas_t result_3 = {0};
      FX_COPY_PTR(prl_1, &prl_2);
      _fx_copy_R14Ast__pragmas_t(&result_2, &result_3);
      if (prl_2 != 0) {
         _fx_R14Ast__pragmas_t v_0 = {0};
         fx_str_t libname_0 = {0};
         fx_str_t v_1 = {0};
         fx_str_t fname_0 = {0};
         fx_str_t v_2 = {0};
         fx_str_t v_3 = {0};
         fx_str_t whole_msg_0 = {0};
         _fx_LS all_compile_err_ctx_0 = 0;
         fx_str_t whole_msg_1 = {0};
         fx_exn_t v_4 = {0};
         _fx_T2SR10Ast__loc_t v_5 = {0};
         _fx_LT2SR10Ast__loc_t v_6 = 0;
         _fx_R14Ast__pragmas_t v_7 = {0};
         fx_str_t fname_1 = {0};
         fx_str_t v_8 = {0};
         fx_str_t v_9 = {0};
         fx_str_t whole_msg_2 = {0};
         _fx_LS all_compile_err_ctx_1 = 0;
         fx_str_t whole_msg_3 = {0};
         fx_exn_t v_10 = {0};
         _fx_LT2SR10Ast__loc_t rest_0 = prl_2->tl;
         _fx_T2SR10Ast__loc_t* v_11 = &prl_2->hd;
         _fx_R10Ast__loc_t* loc_0 = &v_11->t1;
         fx_str_t* pr_0 = &v_11->t0;
         bool v_12;
         fx_str_t slit_0 = FX_MAKE_STR("c++");
         if (_fx_F6__eq__B2SS(pr_0, &slit_0, 0)) {
            v_12 = true;
         }
         else {
            fx_str_t slit_1 = FX_MAKE_STR("C++"); v_12 = _fx_F6__eq__B2SS(pr_0, &slit_1, 0);
         }
         if (v_12) {
            _fx_make_R14Ast__pragmas_t(true, result_3.pragma_clibs, &v_0);
            _fx_free_LT2SR10Ast__loc_t(&prl_1);
            FX_COPY_PTR(rest_0, &prl_1);
            _fx_free_R14Ast__pragmas_t(&result_2);
            _fx_copy_R14Ast__pragmas_t(&v_0, &result_2);
         }
         else {
            bool v_13;
            fx_str_t slit_2 = FX_MAKE_STR("clib");
            v_13 = _fx_M6StringFM10startswithB2SS(pr_0, &slit_2, 0);
            if (v_13) {
               int_ p_0;
               fx_str_t slit_3 = FX_MAKE_STR(":");
               p_0 = _fx_M6StringFM4findi3SSi(pr_0, &slit_3, 0, 0);
               if (p_0 >= 0) {
                  FX_CALL(fx_substr(pr_0, p_0 + 1, 0, 1, 2, &v_1), _fx_catch_2);
                  FX_CALL(_fx_M6StringFM5stripS1S(&v_1, &libname_0, 0), _fx_catch_2);
               }
               else {
                  if (loc_0->m_idx >= 0) {
                     int_ v_14 = loc_0->m_idx;
                     FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_14), _fx_catch_2);
                     fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_14))->u.defmodule_t.t1,
                        &fname_0);
                  }
                  else {
                     fx_str_t slit_4 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_4, &fname_0);
                  }
                  FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_2, 0), _fx_catch_2);
                  FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_3, 0), _fx_catch_2);
                  fx_str_t slit_5 = FX_MAKE_STR(":");
                  fx_str_t slit_6 = FX_MAKE_STR(":");
                  fx_str_t slit_7 = FX_MAKE_STR(": error: invalid format of clib pragma \"");
                  fx_str_t slit_8 = FX_MAKE_STR("\", it should be \"clib: <libname>\"");
                  {
                     const fx_str_t strs_0[] = { fname_0, slit_5, v_2, slit_6, v_3, slit_7, *pr_0, slit_8 };
                     FX_CALL(fx_strjoin(0, 0, 0, strs_0, 8, &whole_msg_0), _fx_catch_2);
                  }
                  FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
                  if (all_compile_err_ctx_0 == 0) {
                     fx_copy_str(&whole_msg_0, &whole_msg_1);
                  }
                  else {
                     _fx_LS v_15 = 0;
                     FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_15), _fx_catch_0);
                     fx_str_t slit_9 =
                        FX_MAKE_STR("\n"
                           U"\t");
                     FX_CALL(_fx_F4joinS2SLS(&slit_9, v_15, &whole_msg_1, 0), _fx_catch_0);

                  _fx_catch_0: ;
                     if (v_15) {
                        _fx_free_LS(&v_15);
                     }
                  }
                  FX_CHECK_EXN(_fx_catch_2);
                  FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_1, &v_4), _fx_catch_2);
                  FX_THROW(&v_4, true, _fx_catch_2);
               }
               _fx_make_T2SR10Ast__loc_t(&libname_0, loc_0, &v_5);
               FX_COPY_PTR(result_3.pragma_clibs, &v_6);
               FX_CALL(_fx_cons_LT2SR10Ast__loc_t(&v_5, v_6, false, &v_6), _fx_catch_2);
               _fx_make_R14Ast__pragmas_t(result_3.pragma_cpp, v_6, &v_7);
               _fx_free_LT2SR10Ast__loc_t(&prl_1);
               FX_COPY_PTR(rest_0, &prl_1);
               _fx_free_R14Ast__pragmas_t(&result_2);
               _fx_copy_R14Ast__pragmas_t(&v_7, &result_2);
            }
            else {
               if (loc_0->m_idx >= 0) {
                  int_ v_16 = loc_0->m_idx;
                  FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_16), _fx_catch_2);
                  fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_16))->u.defmodule_t.t1,
                     &fname_1);
               }
               else {
                  fx_str_t slit_10 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_10, &fname_1);
               }
               FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_8, 0), _fx_catch_2);
               FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_9, 0), _fx_catch_2);
               fx_str_t slit_11 = FX_MAKE_STR(":");
               fx_str_t slit_12 = FX_MAKE_STR(":");
               fx_str_t slit_13 = FX_MAKE_STR(": error: unrecognized pragma \"");
               fx_str_t slit_14 = FX_MAKE_STR("\"");
               {
                  const fx_str_t strs_1[] = { fname_1, slit_11, v_8, slit_12, v_9, slit_13, *pr_0, slit_14 };
                  FX_CALL(fx_strjoin(0, 0, 0, strs_1, 8, &whole_msg_2), _fx_catch_2);
               }
               FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_1);
               if (all_compile_err_ctx_1 == 0) {
                  fx_copy_str(&whole_msg_2, &whole_msg_3);
               }
               else {
                  _fx_LS v_17 = 0;
                  FX_CALL(_fx_cons_LS(&whole_msg_2, all_compile_err_ctx_1, true, &v_17), _fx_catch_1);
                  fx_str_t slit_15 =
                     FX_MAKE_STR("\n"
                        U"\t");
                  FX_CALL(_fx_F4joinS2SLS(&slit_15, v_17, &whole_msg_3, 0), _fx_catch_1);

               _fx_catch_1: ;
                  if (v_17) {
                     _fx_free_LS(&v_17);
                  }
               }
               FX_CHECK_EXN(_fx_catch_2);
               FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_3, &v_10), _fx_catch_2);
               FX_THROW(&v_10, true, _fx_catch_2);
            }
         }

      _fx_catch_2: ;
         fx_free_exn(&v_10);
         FX_FREE_STR(&whole_msg_3);
         if (all_compile_err_ctx_1) {
            _fx_free_LS(&all_compile_err_ctx_1);
         }
         FX_FREE_STR(&whole_msg_2);
         FX_FREE_STR(&v_9);
         FX_FREE_STR(&v_8);
         FX_FREE_STR(&fname_1);
         _fx_free_R14Ast__pragmas_t(&v_7);
         if (v_6) {
            _fx_free_LT2SR10Ast__loc_t(&v_6);
         }
         _fx_free_T2SR10Ast__loc_t(&v_5);
         fx_free_exn(&v_4);
         FX_FREE_STR(&whole_msg_1);
         if (all_compile_err_ctx_0) {
            _fx_free_LS(&all_compile_err_ctx_0);
         }
         FX_FREE_STR(&whole_msg_0);
         FX_FREE_STR(&v_3);
         FX_FREE_STR(&v_2);
         FX_FREE_STR(&fname_0);
         FX_FREE_STR(&v_1);
         FX_FREE_STR(&libname_0);
         _fx_free_R14Ast__pragmas_t(&v_0);
      }
      else if (prl_2 == 0) {
         _fx_free_R14Ast__pragmas_t(&result_1);
         _fx_copy_R14Ast__pragmas_t(&result_3, &result_1);
         FX_BREAK(_fx_catch_3);

      _fx_catch_3: ;
      }
      else {
         FX_FAST_THROW(FX_EXN_NoMatchError, _fx_catch_4);
      }
      FX_CHECK_EXN(_fx_catch_4);

   _fx_catch_4: ;
      _fx_free_R14Ast__pragmas_t(&result_3);
      if (prl_2) {
         _fx_free_LT2SR10Ast__loc_t(&prl_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_R14Ast__pragmas_t(&result_1, fx_result);

_fx_cleanup: ;
   _fx_free_R14Ast__pragmas_t(&result_1);
   if (prl_1) {
      _fx_free_LT2SR10Ast__loc_t(&prl_1);
   }
   _fx_free_R14Ast__pragmas_t(&result_2);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13parse_pragmasRM9pragmas_t1LT2SRM5loc_t(
   struct _fx_LT2SR10Ast__loc_t_data_t* prl_0,
   struct _fx_R14Ast__pragmas_t* fx_result,
   void* fx_fv)
{
   _fx_R14Ast__pragmas_t v_0 = {0};
   int fx_status = 0;
   _fx_make_R14Ast__pragmas_t(false, 0, &v_0);
   FX_CALL(_fx_M3AstFM5parseRM9pragmas_t2LT2SRM5loc_tRM9pragmas_t(prl_0, &v_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   _fx_free_R14Ast__pragmas_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t v_0 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(callb_0->ast_cb_typ, &v_0);
   if ((v_0 != 0) + 1 == 2) {
      _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t* f_0 = &v_0->u.Some;
      FX_CALL(f_0->fp(t_0, callb_0, fx_result, f_0->fcv), _fx_catch_0);

   _fx_catch_0: ;
   }
   else {
      FX_CALL(_fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, fx_result, 0), _fx_catch_1);

   _fx_catch_1: ;
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18check_n_walk_tlistLN10Ast__typ_t2LN10Ast__typ_tRM11ast_callb_t(
   struct _fx_LN10Ast__typ_t_data_t* tlist_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LN10Ast__typ_t lstend_0 = 0;
   _fx_LN10Ast__typ_t lst_0 = tlist_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N10Ast__typ_t res_0 = 0;
      _fx_N10Ast__typ_t t_0 = lst_0->hd;
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, &res_0, 0), _fx_catch_0);
      _fx_LN10Ast__typ_t node_0 = 0;
      FX_CALL(_fx_cons_LN10Ast__typ_t(res_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      if (res_0) {
         _fx_free_N10Ast__typ_t(&res_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16check_n_walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t v_0 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(callb_0->ast_cb_exp, &v_0);
   if ((v_0 != 0) + 1 == 2) {
      _fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t* f_0 = &v_0->u.Some;
      FX_CALL(f_0->fp(e_0, callb_0, fx_result, f_0->fcv), _fx_catch_0);

   _fx_catch_0: ;
   }
   else {
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, fx_result, 0), _fx_catch_1);

   _fx_catch_1: ;
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18check_n_walk_elistLN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LN10Ast__exp_t_data_t* elist_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LN10Ast__exp_t lstend_0 = 0;
   _fx_LN10Ast__exp_t lst_0 = elist_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N10Ast__exp_t res_0 = 0;
      _fx_N10Ast__exp_t e_0 = lst_0->hd;
      FX_CALL(_fx_M3AstFM16check_n_walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, &res_0, 0), _fx_catch_0);
      _fx_LN10Ast__exp_t node_0 = 0;
      FX_CALL(_fx_cons_LN10Ast__exp_t(res_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      if (res_0) {
         _fx_free_N10Ast__exp_t(&res_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM16check_n_walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t v_0 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(callb_0->ast_cb_pat, &v_0);
   if ((v_0 != 0) + 1 == 2) {
      _fx_FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t* f_0 = &v_0->u.Some;
      FX_CALL(f_0->fp(p_0, callb_0, fx_result, f_0->fcv), _fx_catch_0);

   _fx_catch_0: ;
   }
   else {
      FX_CALL(_fx_M3AstFM8walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, callb_0, fx_result, 0), _fx_catch_1);

   _fx_catch_1: ;
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt6option1FPN10Ast__pat_t2N10Ast__pat_tR16Ast__ast_callb_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM18check_n_walk_plistLN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(
   struct _fx_LN10Ast__pat_t_data_t* plist_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LN10Ast__pat_t lstend_0 = 0;
   _fx_LN10Ast__pat_t lst_0 = plist_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N10Ast__pat_t res_0 = 0;
      _fx_N10Ast__pat_t p_0 = lst_0->hd;
      FX_CALL(_fx_M3AstFM16check_n_walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, callb_0, &res_0, 0), _fx_catch_0);
      _fx_LN10Ast__pat_t node_0 = 0;
      FX_CALL(_fx_cons_LN10Ast__pat_t(res_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      if (res_0) {
         _fx_free_N10Ast__pat_t(&res_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(t_0);
   if (tag_0 == 1) {
      _fx_Nt6option1N10Ast__typ_t v_0 = 0;
      _fx_rNt6option1N10Ast__typ_t r_0 = t_0->u.TypVar;
      FX_COPY_PTR(r_0->data, &v_0);
      if ((v_0 != 0) + 1 == 2) {
         _fx_N10Ast__typ_t v_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_2 = 0;
         FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(v_0->u.Some, callb_0, &v_1, 0),
            _fx_catch_0);
         FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(v_1, &v_2), _fx_catch_0);
         _fx_Nt6option1N10Ast__typ_t* v_3 = &r_0->data;
         _fx_free_Nt6option1N10Ast__typ_t(v_3);
         FX_COPY_PTR(v_2, v_3);

      _fx_catch_0: ;
         if (v_2) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_2);
         }
         if (v_1) {
            _fx_free_N10Ast__typ_t(&v_1);
         }
      }
      FX_CHECK_EXN(_fx_catch_1);
      FX_COPY_PTR(t_0, fx_result);

   _fx_catch_1: ;
      if (v_0) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_0);
      }
   }
   else if (tag_0 == 5) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 6) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 7) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 8) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 9) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 10) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 11) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 12) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 13) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 14) {
      _fx_LN10Ast__typ_t v_4 = 0;
      _fx_N10Ast__typ_t v_5 = 0;
      _fx_T2LN10Ast__typ_tN10Ast__typ_t* vcase_0 = &t_0->u.TypFun;
      FX_CALL(_fx_M3AstFM18check_n_walk_tlistLN10Ast__typ_t2LN10Ast__typ_tRM11ast_callb_t(vcase_0->t0, callb_0, &v_4, 0),
         _fx_catch_2);
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(vcase_0->t1, callb_0, &v_5, 0),
         _fx_catch_2);
      FX_CALL(_fx_M3AstFM6TypFunN10Ast__typ_t2LN10Ast__typ_tN10Ast__typ_t(v_4, v_5, fx_result), _fx_catch_2);

   _fx_catch_2: ;
      if (v_5) {
         _fx_free_N10Ast__typ_t(&v_5);
      }
      if (v_4) {
         _fx_free_LN10Ast__typ_t(&v_4);
      }
   }
   else if (tag_0 == 15) {
      _fx_N10Ast__typ_t v_6 = 0;
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0->u.TypList, callb_0, &v_6, 0),
         _fx_catch_3);
      FX_CALL(_fx_M3AstFM7TypListN10Ast__typ_t1N10Ast__typ_t(v_6, fx_result), _fx_catch_3);

   _fx_catch_3: ;
      if (v_6) {
         _fx_free_N10Ast__typ_t(&v_6);
      }
   }
   else if (tag_0 == 16) {
      _fx_N10Ast__typ_t v_7 = 0;
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0->u.TypVector, callb_0, &v_7, 0),
         _fx_catch_4);
      FX_CALL(_fx_M3AstFM9TypVectorN10Ast__typ_t1N10Ast__typ_t(v_7, fx_result), _fx_catch_4);

   _fx_catch_4: ;
      if (v_7) {
         _fx_free_N10Ast__typ_t(&v_7);
      }
   }
   else if (tag_0 == 17) {
      _fx_LN10Ast__typ_t v_8 = 0;
      FX_CALL(_fx_M3AstFM18check_n_walk_tlistLN10Ast__typ_t2LN10Ast__typ_tRM11ast_callb_t(t_0->u.TypTuple, callb_0, &v_8, 0),
         _fx_catch_5);
      FX_CALL(_fx_M3AstFM8TypTupleN10Ast__typ_t1LN10Ast__typ_t(v_8, fx_result), _fx_catch_5);

   _fx_catch_5: ;
      if (v_8) {
         _fx_free_LN10Ast__typ_t(&v_8);
      }
   }
   else if (tag_0 == 2) {
      _fx_Nt6option1N10Ast__typ_t v_9 = 0;
      _fx_Nt6option1N10Ast__typ_t t_opt_0 = t_0->u.TypVarTuple;
      if ((t_opt_0 != 0) + 1 == 2) {
         _fx_N10Ast__typ_t v_10 = 0;
         FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_opt_0->u.Some, callb_0, &v_10, 0),
            _fx_catch_6);
         FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(v_10, &v_9), _fx_catch_6);

      _fx_catch_6: ;
         if (v_10) {
            _fx_free_N10Ast__typ_t(&v_10);
         }
      }
      else {
         FX_COPY_PTR(_fx_g11Ast__None4_, &v_9);
      }
      FX_CHECK_EXN(_fx_catch_7);
      FX_CALL(_fx_M3AstFM11TypVarTupleN10Ast__typ_t1Nt6option1N10Ast__typ_t(v_9, fx_result), _fx_catch_7);

   _fx_catch_7: ;
      if (v_9) {
         _fx_free_Nt6option1N10Ast__typ_t(&v_9);
      }
   }
   else if (tag_0 == 18) {
      _fx_N10Ast__typ_t v_11 = 0;
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0->u.TypRef, callb_0, &v_11, 0),
         _fx_catch_8);
      FX_CALL(_fx_M3AstFM6TypRefN10Ast__typ_t1N10Ast__typ_t(v_11, fx_result), _fx_catch_8);

   _fx_catch_8: ;
      if (v_11) {
         _fx_free_N10Ast__typ_t(&v_11);
      }
   }
   else if (tag_0 == 19) {
      _fx_N10Ast__typ_t v_12 = 0;
      _fx_T2iN10Ast__typ_t* vcase_1 = &t_0->u.TypArray;
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(vcase_1->t1, callb_0, &v_12, 0),
         _fx_catch_9);
      FX_CALL(_fx_M3AstFM8TypArrayN10Ast__typ_t2iN10Ast__typ_t(vcase_1->t0, v_12, fx_result), _fx_catch_9);

   _fx_catch_9: ;
      if (v_12) {
         _fx_free_N10Ast__typ_t(&v_12);
      }
   }
   else if (tag_0 == 3) {
      _fx_N10Ast__typ_t v_13 = 0;
      FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0->u.TypVarArray, callb_0, &v_13, 0),
         _fx_catch_10);
      FX_CALL(_fx_M3AstFM11TypVarArrayN10Ast__typ_t1N10Ast__typ_t(v_13, fx_result), _fx_catch_10);

   _fx_catch_10: ;
      if (v_13) {
         _fx_free_N10Ast__typ_t(&v_13);
      }
   }
   else if (tag_0 == 4) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 20) {
      _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB v_14 = {0};
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t new_relems_0 = 0;
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t relems_0 = 0;
      _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB v_15 = {0};
      _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB r_1 = t_0->u.TypRecord;
      _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&r_1->data, &v_14);
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t lstend_0 = 0;
      FX_COPY_PTR(v_14.t0, &relems_0);
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t lst_0 = relems_0;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_R16Ast__val_flags_t flags_0 = {0};
         _fx_N10Ast__typ_t t_1 = 0;
         _fx_N10Ast__exp_t v_16 = 0;
         _fx_N10Ast__typ_t v_17 = 0;
         _fx_N10Ast__exp_t v_18 = 0;
         _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t tup_0 = {0};
         _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* __pat___0 = &lst_0->hd;
         _fx_copy_R16Ast__val_flags_t(&__pat___0->t0, &flags_0);
         _fx_R9Ast__id_t n_0 = __pat___0->t1;
         FX_COPY_PTR(__pat___0->t2, &t_1);
         FX_COPY_PTR(__pat___0->t3, &v_16);
         FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_1, callb_0, &v_17, 0), _fx_catch_11);
         FX_CALL(_fx_M3AstFM16check_n_walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_16, callb_0, &v_18, 0),
            _fx_catch_11);
         _fx_make_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&flags_0, &n_0, v_17, v_18, &tup_0);
         _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t node_0 = 0;
         FX_CALL(_fx_cons_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&tup_0, 0, false, &node_0), _fx_catch_11);
         FX_LIST_APPEND(new_relems_0, lstend_0, node_0);

      _fx_catch_11: ;
         _fx_free_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&tup_0);
         if (v_18) {
            _fx_free_N10Ast__exp_t(&v_18);
         }
         if (v_17) {
            _fx_free_N10Ast__typ_t(&v_17);
         }
         if (v_16) {
            _fx_free_N10Ast__exp_t(&v_16);
         }
         if (t_1) {
            _fx_free_N10Ast__typ_t(&t_1);
         }
         _fx_free_R16Ast__val_flags_t(&flags_0);
         FX_CHECK_EXN(_fx_catch_12);
      }
      _fx_make_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(new_relems_0, v_14.t1, &v_15);
      _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* v_19 = &r_1->data;
      _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(v_19);
      _fx_copy_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_15, v_19);
      FX_COPY_PTR(t_0, fx_result);

   _fx_catch_12: ;
      _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_15);
      if (relems_0) {
         _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&relems_0);
      }
      if (new_relems_0) {
         _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&new_relems_0);
      }
      _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_14);
   }
   else if (tag_0 == 21) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 22) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 23) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 24) {
      _fx_LN10Ast__typ_t v_20 = 0;
      _fx_T2LN10Ast__typ_tR9Ast__id_t* vcase_2 = &t_0->u.TypApp;
      FX_CALL(_fx_M3AstFM18check_n_walk_tlistLN10Ast__typ_t2LN10Ast__typ_tRM11ast_callb_t(vcase_2->t0, callb_0, &v_20, 0),
         _fx_catch_13);
      FX_CALL(_fx_M3AstFM6TypAppN10Ast__typ_t2LN10Ast__typ_tRM4id_t(v_20, &vcase_2->t1, fx_result), _fx_catch_13);

   _fx_catch_13: ;
      if (v_20) {
         _fx_free_LN10Ast__typ_t(&v_20);
      }
   }
   else if (tag_0 == 25) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else if (tag_0 == 26) {
      FX_COPY_PTR(t_0, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(e_0);
   if (tag_0 == 1) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else if (tag_0 == 2) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else if (tag_0 == 3) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else if (tag_0 == 4) {
      _fx_Nt6option1N10Ast__exp_t v_0 = 0;
      _fx_T2Nt6option1N10Ast__exp_tR10Ast__loc_t* vcase_0 = &e_0->u.ExpReturn;
      FX_CALL(
         _fx_M3AstFM13walk_exp_opt_Nt6option1N10Ast__exp_t2Nt6option1N10Ast__exp_tRM11ast_callb_t(vcase_0->t0, callb_0, &v_0,
            0), _fx_catch_0);
      FX_CALL(_fx_M3AstFM9ExpReturnN10Ast__exp_t2Nt6option1N10Ast__exp_tRM5loc_t(v_0, &vcase_0->t1, fx_result), _fx_catch_0);

   _fx_catch_0: ;
      if (v_0) {
         _fx_free_Nt6option1N10Ast__exp_t(&v_0);
      }
   }
   else if (tag_0 == 5) {
      _fx_Nt6option1N10Ast__exp_t v_1 = 0;
      _fx_Nt6option1N10Ast__exp_t v_2 = 0;
      _fx_Nt6option1N10Ast__exp_t v_3 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_4 = {0};
      _fx_T4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_1 =
         &e_0->u.ExpRange;
      FX_CALL(
         _fx_M3AstFM13walk_exp_opt_Nt6option1N10Ast__exp_t2Nt6option1N10Ast__exp_tRM11ast_callb_t(vcase_1->t0, callb_0, &v_1,
            0), _fx_catch_1);
      FX_CALL(
         _fx_M3AstFM13walk_exp_opt_Nt6option1N10Ast__exp_t2Nt6option1N10Ast__exp_tRM11ast_callb_t(vcase_1->t1, callb_0, &v_2,
            0), _fx_catch_1);
      FX_CALL(
         _fx_M3AstFM13walk_exp_opt_Nt6option1N10Ast__exp_t2Nt6option1N10Ast__exp_tRM11ast_callb_t(vcase_1->t2, callb_0, &v_3,
            0), _fx_catch_1);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_1->t3, callb_0, &v_4, 0),
         _fx_catch_1);
      FX_CALL(
         _fx_M3AstFM8ExpRangeN10Ast__exp_t4Nt6option1N10Ast__exp_tNt6option1N10Ast__exp_tNt6option1N10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
            v_1, v_2, v_3, &v_4, fx_result), _fx_catch_1);

   _fx_catch_1: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_4);
      if (v_3) {
         _fx_free_Nt6option1N10Ast__exp_t(&v_3);
      }
      if (v_2) {
         _fx_free_Nt6option1N10Ast__exp_t(&v_2);
      }
      if (v_1) {
         _fx_free_Nt6option1N10Ast__exp_t(&v_1);
      }
   }
   else if (tag_0 == 6) {
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_5 = {0};
      _fx_T2N10Ast__lit_tT2N10Ast__typ_tR10Ast__loc_t* vcase_2 = &e_0->u.ExpLit;
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_2->t1, callb_0, &v_5, 0),
         _fx_catch_2);
      FX_CALL(_fx_M3AstFM6ExpLitN10Ast__exp_t2N10Ast__lit_tT2N10Ast__typ_tRM5loc_t(&vcase_2->t0, &v_5, fx_result), _fx_catch_2);

   _fx_catch_2: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_5);
   }
   else if (tag_0 == 7) {
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_6 = {0};
      _fx_T2R9Ast__id_tT2N10Ast__typ_tR10Ast__loc_t* vcase_3 = &e_0->u.ExpIdent;
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_3->t1, callb_0, &v_6, 0),
         _fx_catch_3);
      FX_CALL(_fx_M3AstFM8ExpIdentN10Ast__exp_t2RM4id_tT2N10Ast__typ_tRM5loc_t(&vcase_3->t0, &v_6, fx_result), _fx_catch_3);

   _fx_catch_3: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_6);
   }
   else if (tag_0 == 8) {
      _fx_N10Ast__exp_t v_7 = 0;
      _fx_N10Ast__exp_t v_8 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_9 = {0};
      _fx_T4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_4 = &e_0->u.ExpBinary;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_4->t1, callb_0, &v_7, 0), _fx_catch_4);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_4->t2, callb_0, &v_8, 0), _fx_catch_4);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_4->t3, callb_0, &v_9, 0),
         _fx_catch_4);
      FX_CALL(
         _fx_M3AstFM9ExpBinaryN10Ast__exp_t4N13Ast__binary_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(vcase_4->t0, v_7,
            v_8, &v_9, fx_result), _fx_catch_4);

   _fx_catch_4: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_9);
      if (v_8) {
         _fx_free_N10Ast__exp_t(&v_8);
      }
      if (v_7) {
         _fx_free_N10Ast__exp_t(&v_7);
      }
   }
   else if (tag_0 == 9) {
      _fx_N10Ast__exp_t v_10 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_11 = {0};
      _fx_T3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_5 = &e_0->u.ExpUnary;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_5->t1, callb_0, &v_10, 0), _fx_catch_5);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_5->t2, callb_0, &v_11, 0),
         _fx_catch_5);
      FX_CALL(
         _fx_M3AstFM8ExpUnaryN10Ast__exp_t3N12Ast__unary_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(&vcase_5->t0, v_10, &v_11,
            fx_result), _fx_catch_5);

   _fx_catch_5: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_11);
      if (v_10) {
         _fx_free_N10Ast__exp_t(&v_10);
      }
   }
   else if (tag_0 == 10) {
      _fx_LN10Ast__exp_t v_12 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_13 = {0};
      _fx_T3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_6 = &e_0->u.ExpIntrin;
      FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(vcase_6->t1, callb_0, &v_12, 0),
         _fx_catch_6);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_6->t2, callb_0, &v_13, 0),
         _fx_catch_6);
      FX_CALL(
         _fx_M3AstFM9ExpIntrinN10Ast__exp_t3N13Ast__intrin_tLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(&vcase_6->t0, v_12, &v_13,
            fx_result), _fx_catch_6);

   _fx_catch_6: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_13);
      if (v_12) {
         _fx_free_LN10Ast__exp_t(&v_12);
      }
   }
   else if (tag_0 == 12) {
      _fx_LN10Ast__exp_t v_14 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_15 = {0};
      _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_7 = &e_0->u.ExpSeq;
      FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(vcase_7->t0, callb_0, &v_14, 0),
         _fx_catch_7);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_7->t1, callb_0, &v_15, 0),
         _fx_catch_7);
      FX_CALL(_fx_M3AstFM6ExpSeqN10Ast__exp_t2LN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_14, &v_15, fx_result), _fx_catch_7);

   _fx_catch_7: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_15);
      if (v_14) {
         _fx_free_LN10Ast__exp_t(&v_14);
      }
   }
   else if (tag_0 == 11) {
      _fx_N10Ast__exp_t v_16 = 0;
      _fx_T2R9Ast__id_tN10Ast__exp_t* vcase_8 = &e_0->u.ExpSync;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_8->t1, callb_0, &v_16, 0), _fx_catch_8);
      FX_CALL(_fx_M3AstFM7ExpSyncN10Ast__exp_t2RM4id_tN10Ast__exp_t(&vcase_8->t0, v_16, fx_result), _fx_catch_8);

   _fx_catch_8: ;
      if (v_16) {
         _fx_free_N10Ast__exp_t(&v_16);
      }
   }
   else if (tag_0 == 13) {
      _fx_LN10Ast__exp_t v_17 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_18 = {0};
      _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_9 = &e_0->u.ExpMkTuple;
      FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(vcase_9->t0, callb_0, &v_17, 0),
         _fx_catch_9);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_9->t1, callb_0, &v_18, 0),
         _fx_catch_9);
      FX_CALL(_fx_M3AstFM10ExpMkTupleN10Ast__exp_t2LN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_17, &v_18, fx_result), _fx_catch_9);

   _fx_catch_9: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_18);
      if (v_17) {
         _fx_free_LN10Ast__exp_t(&v_17);
      }
   }
   else if (tag_0 == 14) {
      _fx_LLN10Ast__exp_t v_19 = 0;
      _fx_LLN10Ast__exp_t ell_0 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_20 = {0};
      _fx_T2LLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_10 = &e_0->u.ExpMkArray;
      _fx_LLN10Ast__exp_t lstend_0 = 0;
      FX_COPY_PTR(vcase_10->t0, &ell_0);
      _fx_LLN10Ast__exp_t lst_0 = ell_0;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_LN10Ast__exp_t res_0 = 0;
         _fx_LN10Ast__exp_t el_0 = lst_0->hd;
         FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(el_0, callb_0, &res_0, 0), _fx_catch_10);
         _fx_LLN10Ast__exp_t node_0 = 0;
         FX_CALL(_fx_cons_LLN10Ast__exp_t(res_0, 0, false, &node_0), _fx_catch_10);
         FX_LIST_APPEND(v_19, lstend_0, node_0);

      _fx_catch_10: ;
         if (res_0) {
            _fx_free_LN10Ast__exp_t(&res_0);
         }
         FX_CHECK_EXN(_fx_catch_11);
      }
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_10->t1, callb_0, &v_20, 0),
         _fx_catch_11);
      FX_CALL(_fx_M3AstFM10ExpMkArrayN10Ast__exp_t2LLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_19, &v_20, fx_result),
         _fx_catch_11);

   _fx_catch_11: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_20);
      if (ell_0) {
         _fx_free_LLN10Ast__exp_t(&ell_0);
      }
      if (v_19) {
         _fx_free_LLN10Ast__exp_t(&v_19);
      }
   }
   else if (tag_0 == 15) {
      _fx_LN10Ast__exp_t v_21 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_22 = {0};
      _fx_T2LN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_11 = &e_0->u.ExpMkVector;
      FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(vcase_11->t0, callb_0, &v_21, 0),
         _fx_catch_12);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_11->t1, callb_0, &v_22, 0),
         _fx_catch_12);
      FX_CALL(_fx_M3AstFM11ExpMkVectorN10Ast__exp_t2LN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_21, &v_22, fx_result),
         _fx_catch_12);

   _fx_catch_12: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_22);
      if (v_21) {
         _fx_free_LN10Ast__exp_t(&v_21);
      }
   }
   else if (tag_0 == 16) {
      _fx_N10Ast__exp_t v_23 = 0;
      _fx_LT2R9Ast__id_tN10Ast__exp_t v_24 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_25 = {0};
      _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_12 = &e_0->u.ExpMkRecord;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_12->t0, callb_0, &v_23, 0), _fx_catch_13);
      FX_CALL(
         _fx_M3AstFM10walk_ne_l_LT2RM4id_tN10Ast__exp_t2LT2RM4id_tN10Ast__exp_tRM11ast_callb_t(vcase_12->t1, callb_0, &v_24, 0),
         _fx_catch_13);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_12->t2, callb_0, &v_25, 0),
         _fx_catch_13);
      FX_CALL(
         _fx_M3AstFM11ExpMkRecordN10Ast__exp_t3N10Ast__exp_tLT2RM4id_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_23, v_24, &v_25,
            fx_result), _fx_catch_13);

   _fx_catch_13: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_25);
      if (v_24) {
         _fx_free_LT2R9Ast__id_tN10Ast__exp_t(&v_24);
      }
      if (v_23) {
         _fx_free_N10Ast__exp_t(&v_23);
      }
   }
   else if (tag_0 == 17) {
      _fx_N10Ast__exp_t v_26 = 0;
      _fx_LT2R9Ast__id_tN10Ast__exp_t v_27 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_28 = {0};
      _fx_T3N10Ast__exp_tLT2R9Ast__id_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_13 = &e_0->u.ExpUpdateRecord;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_13->t0, callb_0, &v_26, 0), _fx_catch_14);
      FX_CALL(
         _fx_M3AstFM10walk_ne_l_LT2RM4id_tN10Ast__exp_t2LT2RM4id_tN10Ast__exp_tRM11ast_callb_t(vcase_13->t1, callb_0, &v_27, 0),
         _fx_catch_14);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_13->t2, callb_0, &v_28, 0),
         _fx_catch_14);
      FX_CALL(
         _fx_M3AstFM15ExpUpdateRecordN10Ast__exp_t3N10Ast__exp_tLT2RM4id_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_26, v_27,
            &v_28, fx_result), _fx_catch_14);

   _fx_catch_14: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_28);
      if (v_27) {
         _fx_free_LT2R9Ast__id_tN10Ast__exp_t(&v_27);
      }
      if (v_26) {
         _fx_free_N10Ast__exp_t(&v_26);
      }
   }
   else if (tag_0 == 18) {
      _fx_N10Ast__exp_t v_29 = 0;
      _fx_LN10Ast__exp_t v_30 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_31 = {0};
      _fx_T3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_14 = &e_0->u.ExpCall;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_14->t0, callb_0, &v_29, 0), _fx_catch_15);
      FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(vcase_14->t1, callb_0, &v_30, 0),
         _fx_catch_15);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_14->t2, callb_0, &v_31, 0),
         _fx_catch_15);
      FX_CALL(_fx_M3AstFM7ExpCallN10Ast__exp_t3N10Ast__exp_tLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_29, v_30, &v_31, fx_result),
         _fx_catch_15);

   _fx_catch_15: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_31);
      if (v_30) {
         _fx_free_LN10Ast__exp_t(&v_30);
      }
      if (v_29) {
         _fx_free_N10Ast__exp_t(&v_29);
      }
   }
   else if (tag_0 == 19) {
      _fx_N10Ast__exp_t v_32 = 0;
      _fx_LN10Ast__exp_t v_33 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_34 = {0};
      _fx_T5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_15 =
         &e_0->u.ExpAt;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_15->t0, callb_0, &v_32, 0), _fx_catch_16);
      FX_CALL(_fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(vcase_15->t3, callb_0, &v_33, 0),
         _fx_catch_16);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_15->t4, callb_0, &v_34, 0),
         _fx_catch_16);
      FX_CALL(
         _fx_M3AstFM5ExpAtN10Ast__exp_t5N10Ast__exp_tN13Ast__border_tN18Ast__interpolate_tLN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(
            v_32, &vcase_15->t1, &vcase_15->t2, v_33, &v_34, fx_result), _fx_catch_16);

   _fx_catch_16: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_34);
      if (v_33) {
         _fx_free_LN10Ast__exp_t(&v_33);
      }
      if (v_32) {
         _fx_free_N10Ast__exp_t(&v_32);
      }
   }
   else if (tag_0 == 20) {
      _fx_N10Ast__exp_t v_35 = 0;
      _fx_N10Ast__exp_t v_36 = 0;
      _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* vcase_16 = &e_0->u.ExpAssign;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_16->t0, callb_0, &v_35, 0), _fx_catch_17);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_16->t1, callb_0, &v_36, 0), _fx_catch_17);
      FX_CALL(_fx_M3AstFM9ExpAssignN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tRM5loc_t(v_35, v_36, &vcase_16->t2, fx_result),
         _fx_catch_17);

   _fx_catch_17: ;
      if (v_36) {
         _fx_free_N10Ast__exp_t(&v_36);
      }
      if (v_35) {
         _fx_free_N10Ast__exp_t(&v_35);
      }
   }
   else if (tag_0 == 21) {
      _fx_N10Ast__exp_t v_37 = 0;
      _fx_N10Ast__exp_t v_38 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_39 = {0};
      _fx_T3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_17 = &e_0->u.ExpMem;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_17->t0, callb_0, &v_37, 0), _fx_catch_18);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_17->t1, callb_0, &v_38, 0), _fx_catch_18);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_17->t2, callb_0, &v_39, 0),
         _fx_catch_18);
      FX_CALL(_fx_M3AstFM6ExpMemN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_37, v_38, &v_39, fx_result),
         _fx_catch_18);

   _fx_catch_18: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_39);
      if (v_38) {
         _fx_free_N10Ast__exp_t(&v_38);
      }
      if (v_37) {
         _fx_free_N10Ast__exp_t(&v_37);
      }
   }
   else if (tag_0 == 22) {
      _fx_N10Ast__exp_t v_40 = 0;
      _fx_T2N10Ast__exp_tR10Ast__loc_t* vcase_18 = &e_0->u.ExpThrow;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_18->t0, callb_0, &v_40, 0), _fx_catch_19);
      FX_CALL(_fx_M3AstFM8ExpThrowN10Ast__exp_t2N10Ast__exp_tRM5loc_t(v_40, &vcase_18->t1, fx_result), _fx_catch_19);

   _fx_catch_19: ;
      if (v_40) {
         _fx_free_N10Ast__exp_t(&v_40);
      }
   }
   else if (tag_0 == 23) {
      _fx_N10Ast__exp_t v_41 = 0;
      _fx_N10Ast__exp_t v_42 = 0;
      _fx_N10Ast__exp_t v_43 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_44 = {0};
      _fx_T4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_19 = &e_0->u.ExpIf;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_19->t0, callb_0, &v_41, 0), _fx_catch_20);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_19->t1, callb_0, &v_42, 0), _fx_catch_20);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_19->t2, callb_0, &v_43, 0), _fx_catch_20);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_19->t3, callb_0, &v_44, 0),
         _fx_catch_20);
      FX_CALL(
         _fx_M3AstFM5ExpIfN10Ast__exp_t4N10Ast__exp_tN10Ast__exp_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_41, v_42, v_43, &v_44,
            fx_result), _fx_catch_20);

   _fx_catch_20: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_44);
      if (v_43) {
         _fx_free_N10Ast__exp_t(&v_43);
      }
      if (v_42) {
         _fx_free_N10Ast__exp_t(&v_42);
      }
      if (v_41) {
         _fx_free_N10Ast__exp_t(&v_41);
      }
   }
   else if (tag_0 == 24) {
      _fx_N10Ast__exp_t v_45 = 0;
      _fx_N10Ast__exp_t v_46 = 0;
      _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* vcase_20 = &e_0->u.ExpWhile;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_20->t0, callb_0, &v_45, 0), _fx_catch_21);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_20->t1, callb_0, &v_46, 0), _fx_catch_21);
      FX_CALL(_fx_M3AstFM8ExpWhileN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tRM5loc_t(v_45, v_46, &vcase_20->t2, fx_result),
         _fx_catch_21);

   _fx_catch_21: ;
      if (v_46) {
         _fx_free_N10Ast__exp_t(&v_46);
      }
      if (v_45) {
         _fx_free_N10Ast__exp_t(&v_45);
      }
   }
   else if (tag_0 == 25) {
      _fx_N10Ast__exp_t v_47 = 0;
      _fx_N10Ast__exp_t v_48 = 0;
      _fx_T3N10Ast__exp_tN10Ast__exp_tR10Ast__loc_t* vcase_21 = &e_0->u.ExpDoWhile;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_21->t0, callb_0, &v_47, 0), _fx_catch_22);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_21->t1, callb_0, &v_48, 0), _fx_catch_22);
      FX_CALL(_fx_M3AstFM10ExpDoWhileN10Ast__exp_t3N10Ast__exp_tN10Ast__exp_tRM5loc_t(v_47, v_48, &vcase_21->t2, fx_result),
         _fx_catch_22);

   _fx_catch_22: ;
      if (v_48) {
         _fx_free_N10Ast__exp_t(&v_48);
      }
      if (v_47) {
         _fx_free_N10Ast__exp_t(&v_47);
      }
   }
   else if (tag_0 == 26) {
      _fx_LT2N10Ast__pat_tN10Ast__exp_t v_49 = 0;
      _fx_N10Ast__pat_t v_50 = 0;
      _fx_N10Ast__exp_t v_51 = 0;
      _fx_T5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tR10Ast__loc_t* vcase_22 = &e_0->u.ExpFor;
      FX_CALL(
         _fx_M3AstFM10walk_pe_l_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(vcase_22->t0,
            callb_0, &v_49, 0), _fx_catch_23);
      FX_CALL(_fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_22->t1, callb_0, &v_50, 0), _fx_catch_23);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_22->t2, callb_0, &v_51, 0), _fx_catch_23);
      FX_CALL(
         _fx_M3AstFM6ExpForN10Ast__exp_t5LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tRM11for_flags_tRM5loc_t(v_49,
            v_50, v_51, &vcase_22->t3, &vcase_22->t4, fx_result), _fx_catch_23);

   _fx_catch_23: ;
      if (v_51) {
         _fx_free_N10Ast__exp_t(&v_51);
      }
      if (v_50) {
         _fx_free_N10Ast__pat_t(&v_50);
      }
      if (v_49) {
         _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&v_49);
      }
   }
   else if (tag_0 == 27) {
      _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t v_52 = 0;
      _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t pew_ll_0 = 0;
      _fx_N10Ast__exp_t v_53 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_54 = {0};
      _fx_T4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tR16Ast__for_flags_tT2N10Ast__typ_tR10Ast__loc_t*
         vcase_23 = &e_0->u.ExpMap;
      _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t lstend_1 = 0;
      FX_COPY_PTR(vcase_23->t0, &pew_ll_0);
      _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t lst_1 = pew_ll_0;
      for (; lst_1; lst_1 = lst_1->tl) {
         _fx_LT2N10Ast__pat_tN10Ast__exp_t pe_l_0 = 0;
         _fx_N10Ast__pat_t idx_pat_0 = 0;
         _fx_LT2N10Ast__pat_tN10Ast__exp_t v_55 = 0;
         _fx_N10Ast__pat_t v_56 = 0;
         _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t tup_0 = {0};
         _fx_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t* __pat___0 = &lst_1->hd;
         FX_COPY_PTR(__pat___0->t0, &pe_l_0);
         FX_COPY_PTR(__pat___0->t1, &idx_pat_0);
         FX_CALL(
            _fx_M3AstFM10walk_pe_l_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(pe_l_0, callb_0,
               &v_55, 0), _fx_catch_24);
         FX_CALL(_fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(idx_pat_0, callb_0, &v_56, 0), _fx_catch_24);
         _fx_make_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(v_55, v_56, &tup_0);
         _fx_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t node_1 = 0;
         FX_CALL(_fx_cons_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(&tup_0, 0, false, &node_1), _fx_catch_24);
         FX_LIST_APPEND(v_52, lstend_1, node_1);

      _fx_catch_24: ;
         _fx_free_T2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(&tup_0);
         if (v_56) {
            _fx_free_N10Ast__pat_t(&v_56);
         }
         if (v_55) {
            _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&v_55);
         }
         if (idx_pat_0) {
            _fx_free_N10Ast__pat_t(&idx_pat_0);
         }
         if (pe_l_0) {
            _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&pe_l_0);
         }
         FX_CHECK_EXN(_fx_catch_25);
      }
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_23->t1, callb_0, &v_53, 0), _fx_catch_25);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_23->t3, callb_0, &v_54, 0),
         _fx_catch_25);
      FX_CALL(
         _fx_M3AstFM6ExpMapN10Ast__exp_t4LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_tN10Ast__exp_tRM11for_flags_tT2N10Ast__typ_tRM5loc_t(
            v_52, v_53, &vcase_23->t2, &v_54, fx_result), _fx_catch_25);

   _fx_catch_25: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_54);
      if (v_53) {
         _fx_free_N10Ast__exp_t(&v_53);
      }
      if (pew_ll_0) {
         _fx_free_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(&pew_ll_0);
      }
      if (v_52) {
         _fx_free_LT2LT2N10Ast__pat_tN10Ast__exp_tN10Ast__pat_t(&v_52);
      }
   }
   else if (tag_0 == 28) {
      _fx_N10Ast__exp_t v_57 = 0;
      _fx_LT2N10Ast__pat_tN10Ast__exp_t v_58 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_59 = {0};
      _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_24 = &e_0->u.ExpTryCatch;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_24->t0, callb_0, &v_57, 0), _fx_catch_26);
      FX_CALL(
         _fx_M3AstFM11walk_cases_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(vcase_24->t1,
            callb_0, &v_58, 0), _fx_catch_26);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_24->t2, callb_0, &v_59, 0),
         _fx_catch_26);
      FX_CALL(
         _fx_M3AstFM11ExpTryCatchN10Ast__exp_t3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_57, v_58,
            &v_59, fx_result), _fx_catch_26);

   _fx_catch_26: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_59);
      if (v_58) {
         _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&v_58);
      }
      if (v_57) {
         _fx_free_N10Ast__exp_t(&v_57);
      }
   }
   else if (tag_0 == 29) {
      _fx_N10Ast__exp_t v_60 = 0;
      _fx_LT2N10Ast__pat_tN10Ast__exp_t v_61 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_62 = {0};
      _fx_T3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tR10Ast__loc_t* vcase_25 = &e_0->u.ExpMatch;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_25->t0, callb_0, &v_60, 0), _fx_catch_27);
      FX_CALL(
         _fx_M3AstFM11walk_cases_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(vcase_25->t1,
            callb_0, &v_61, 0), _fx_catch_27);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_25->t2, callb_0, &v_62, 0),
         _fx_catch_27);
      FX_CALL(
         _fx_M3AstFM8ExpMatchN10Ast__exp_t3N10Ast__exp_tLT2N10Ast__pat_tN10Ast__exp_tT2N10Ast__typ_tRM5loc_t(v_60, v_61, &v_62,
            fx_result), _fx_catch_27);

   _fx_catch_27: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_62);
      if (v_61) {
         _fx_free_LT2N10Ast__pat_tN10Ast__exp_t(&v_61);
      }
      if (v_60) {
         _fx_free_N10Ast__exp_t(&v_60);
      }
   }
   else if (tag_0 == 30) {
      _fx_N10Ast__exp_t v_63 = 0;
      _fx_N10Ast__typ_t v_64 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_65 = {0};
      _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* vcase_26 = &e_0->u.ExpCast;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_26->t0, callb_0, &v_63, 0), _fx_catch_28);
      FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(vcase_26->t1, callb_0, &v_64, 0), _fx_catch_28);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_26->t2, callb_0, &v_65, 0),
         _fx_catch_28);
      FX_CALL(_fx_M3AstFM7ExpCastN10Ast__exp_t3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tRM5loc_t(v_63, v_64, &v_65, fx_result),
         _fx_catch_28);

   _fx_catch_28: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_65);
      if (v_64) {
         _fx_free_N10Ast__typ_t(&v_64);
      }
      if (v_63) {
         _fx_free_N10Ast__exp_t(&v_63);
      }
   }
   else if (tag_0 == 31) {
      _fx_N10Ast__exp_t v_66 = 0;
      _fx_N10Ast__typ_t v_67 = 0;
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_68 = {0};
      _fx_T3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tR10Ast__loc_t* vcase_27 = &e_0->u.ExpTyped;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_27->t0, callb_0, &v_66, 0), _fx_catch_29);
      FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(vcase_27->t1, callb_0, &v_67, 0), _fx_catch_29);
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_27->t2, callb_0, &v_68, 0),
         _fx_catch_29);
      FX_CALL(_fx_M3AstFM8ExpTypedN10Ast__exp_t3N10Ast__exp_tN10Ast__typ_tT2N10Ast__typ_tRM5loc_t(v_66, v_67, &v_68, fx_result),
         _fx_catch_29);

   _fx_catch_29: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_68);
      if (v_67) {
         _fx_free_N10Ast__typ_t(&v_67);
      }
      if (v_66) {
         _fx_free_N10Ast__exp_t(&v_66);
      }
   }
   else if (tag_0 == 32) {
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_69 = {0};
      _fx_T2ST2N10Ast__typ_tR10Ast__loc_t* vcase_28 = &e_0->u.ExpCCode;
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_28->t1, callb_0, &v_69, 0),
         _fx_catch_30);
      FX_CALL(_fx_M3AstFM8ExpCCodeN10Ast__exp_t2ST2N10Ast__typ_tRM5loc_t(&vcase_28->t0, &v_69, fx_result), _fx_catch_30);

   _fx_catch_30: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_69);
   }
   else if (tag_0 == 33) {
      _fx_T2N10Ast__typ_tR10Ast__loc_t v_70 = {0};
      _fx_T3SST2N10Ast__typ_tR10Ast__loc_t* vcase_29 = &e_0->u.ExpData;
      FX_CALL(
         _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(&vcase_29->t2, callb_0, &v_70, 0),
         _fx_catch_31);
      FX_CALL(_fx_M3AstFM7ExpDataN10Ast__exp_t3SST2N10Ast__typ_tRM5loc_t(&vcase_29->t0, &vcase_29->t1, &v_70, fx_result),
         _fx_catch_31);

   _fx_catch_31: ;
      _fx_free_T2N10Ast__typ_tR10Ast__loc_t(&v_70);
   }
   else if (tag_0 == 34) {
      _fx_N10Ast__pat_t v_71 = 0;
      _fx_N10Ast__exp_t v_72 = 0;
      _fx_T4N10Ast__pat_tN10Ast__exp_tR16Ast__val_flags_tR10Ast__loc_t* vcase_30 = &e_0->u.DefVal;
      FX_CALL(_fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_30->t0, callb_0, &v_71, 0), _fx_catch_32);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_30->t1, callb_0, &v_72, 0), _fx_catch_32);
      FX_CALL(
         _fx_M3AstFM6DefValN10Ast__exp_t4N10Ast__pat_tN10Ast__exp_tRM11val_flags_tRM5loc_t(v_71, v_72, &vcase_30->t2,
            &vcase_30->t3, fx_result), _fx_catch_32);

   _fx_catch_32: ;
      if (v_72) {
         _fx_free_N10Ast__exp_t(&v_72);
      }
      if (v_71) {
         _fx_free_N10Ast__pat_t(&v_71);
      }
   }
   else if (tag_0 == 35) {
      _fx_LR9Ast__id_t v_73 = 0;
      _fx_N10Ast__exp_t df_body_0 = 0;
      _fx_N10Ast__typ_t df_typ_0 = 0;
      _fx_LN10Ast__pat_t df_args_0 = 0;
      _fx_LN10Ast__pat_t v_74 = 0;
      _fx_N10Ast__typ_t v_75 = 0;
      _fx_N10Ast__exp_t v_76 = 0;
      _fx_R13Ast__deffun_t v_77 = {0};
      _fx_rR13Ast__deffun_t df_0 = e_0->u.DefFun;
      FX_COPY_PTR(df_0->data.df_templ_args, &v_73);
      if (v_73 != 0) {
         FX_COPY_PTR(e_0, fx_result);
      }
      else {
         _fx_R13Ast__deffun_t* v_78 = &df_0->data;
         FX_COPY_PTR(v_78->df_body, &df_body_0);
         FX_COPY_PTR(v_78->df_typ, &df_typ_0);
         FX_COPY_PTR(v_78->df_args, &df_args_0);
         _fx_R13Ast__deffun_t* v_79 = &df_0->data;
         FX_CALL(_fx_M3AstFM11walk_plist_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(df_args_0, callb_0, &v_74, 0),
            _fx_catch_33);
         FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(df_typ_0, callb_0, &v_75, 0), _fx_catch_33);
         FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(df_body_0, callb_0, &v_76, 0), _fx_catch_33);
         _fx_make_R13Ast__deffun_t(&v_79->df_name, v_79->df_templ_args, v_74, v_75, v_76, &v_79->df_flags, v_79->df_scope,
            &v_79->df_loc, v_79->df_templ_inst, &v_79->df_env, &v_77);
         _fx_R13Ast__deffun_t* v_80 = &df_0->data;
         _fx_free_R13Ast__deffun_t(v_80);
         _fx_copy_R13Ast__deffun_t(&v_77, v_80);
         FX_COPY_PTR(e_0, fx_result);
      }

   _fx_catch_33: ;
      _fx_free_R13Ast__deffun_t(&v_77);
      if (v_76) {
         _fx_free_N10Ast__exp_t(&v_76);
      }
      if (v_75) {
         _fx_free_N10Ast__typ_t(&v_75);
      }
      if (v_74) {
         _fx_free_LN10Ast__pat_t(&v_74);
      }
      if (df_args_0) {
         _fx_free_LN10Ast__pat_t(&df_args_0);
      }
      if (df_typ_0) {
         _fx_free_N10Ast__typ_t(&df_typ_0);
      }
      if (df_body_0) {
         _fx_free_N10Ast__exp_t(&df_body_0);
      }
      FX_FREE_LIST_SIMPLE(&v_73);
   }
   else if (tag_0 == 36) {
      _fx_N10Ast__typ_t dexn_typ_0 = 0;
      _fx_N10Ast__typ_t v_81 = 0;
      _fx_R13Ast__defexn_t v_82 = {0};
      _fx_rR13Ast__defexn_t de_0 = e_0->u.DefExn;
      FX_COPY_PTR(de_0->data.dexn_typ, &dexn_typ_0);
      _fx_R13Ast__defexn_t* v_83 = &de_0->data;
      FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(dexn_typ_0, callb_0, &v_81, 0), _fx_catch_34);
      _fx_make_R13Ast__defexn_t(&v_83->dexn_name, v_81, v_83->dexn_scope, &v_83->dexn_loc, &v_82);
      _fx_R13Ast__defexn_t* v_84 = &de_0->data;
      _fx_free_R13Ast__defexn_t(v_84);
      _fx_copy_R13Ast__defexn_t(&v_82, v_84);
      FX_COPY_PTR(e_0, fx_result);

   _fx_catch_34: ;
      _fx_free_R13Ast__defexn_t(&v_82);
      if (v_81) {
         _fx_free_N10Ast__typ_t(&v_81);
      }
      if (dexn_typ_0) {
         _fx_free_N10Ast__typ_t(&dexn_typ_0);
      }
   }
   else if (tag_0 == 37) {
      _fx_N10Ast__typ_t dt_typ_0 = 0;
      _fx_N10Ast__typ_t v_85 = 0;
      _fx_R13Ast__deftyp_t v_86 = {0};
      _fx_rR13Ast__deftyp_t dt_0 = e_0->u.DefTyp;
      FX_COPY_PTR(dt_0->data.dt_typ, &dt_typ_0);
      _fx_R13Ast__deftyp_t* v_87 = &dt_0->data;
      FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(dt_typ_0, callb_0, &v_85, 0), _fx_catch_35);
      _fx_make_R13Ast__deftyp_t(&v_87->dt_name, v_87->dt_templ_args, v_85, v_87->dt_finalized, v_87->dt_scope, &v_87->dt_loc,
         &v_86);
      _fx_R13Ast__deftyp_t* v_88 = &dt_0->data;
      _fx_free_R13Ast__deftyp_t(v_88);
      _fx_copy_R13Ast__deftyp_t(&v_86, v_88);
      FX_COPY_PTR(e_0, fx_result);

   _fx_catch_35: ;
      _fx_free_R13Ast__deftyp_t(&v_86);
      if (v_85) {
         _fx_free_N10Ast__typ_t(&v_85);
      }
      if (dt_typ_0) {
         _fx_free_N10Ast__typ_t(&dt_typ_0);
      }
   }
   else if (tag_0 == 38) {
      _fx_LT2R9Ast__id_tN10Ast__typ_t dvar_cases_0 = 0;
      _fx_N10Ast__typ_t dvar_alias_0 = 0;
      _fx_N10Ast__typ_t v_89 = 0;
      _fx_LT2R9Ast__id_tN10Ast__typ_t v_90 = 0;
      _fx_R17Ast__defvariant_t v_91 = {0};
      _fx_rR17Ast__defvariant_t dvar_0 = e_0->u.DefVariant;
      _fx_R17Ast__defvariant_t* v_92 = &dvar_0->data;
      FX_COPY_PTR(v_92->dvar_cases, &dvar_cases_0);
      FX_COPY_PTR(v_92->dvar_alias, &dvar_alias_0);
      _fx_R17Ast__defvariant_t* v_93 = &dvar_0->data;
      FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(dvar_alias_0, callb_0, &v_89, 0), _fx_catch_37);
      _fx_LT2R9Ast__id_tN10Ast__typ_t lstend_2 = 0;
      _fx_LT2R9Ast__id_tN10Ast__typ_t lst_2 = dvar_cases_0;
      for (; lst_2; lst_2 = lst_2->tl) {
         _fx_N10Ast__typ_t t_0 = 0;
         _fx_N10Ast__typ_t v_94 = 0;
         _fx_T2R9Ast__id_tN10Ast__typ_t tup_1 = {0};
         _fx_T2R9Ast__id_tN10Ast__typ_t* __pat___1 = &lst_2->hd;
         _fx_R9Ast__id_t n_0 = __pat___1->t0;
         FX_COPY_PTR(__pat___1->t1, &t_0);
         FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, &v_94, 0), _fx_catch_36);
         _fx_make_T2R9Ast__id_tN10Ast__typ_t(&n_0, v_94, &tup_1);
         _fx_LT2R9Ast__id_tN10Ast__typ_t node_2 = 0;
         FX_CALL(_fx_cons_LT2R9Ast__id_tN10Ast__typ_t(&tup_1, 0, false, &node_2), _fx_catch_36);
         FX_LIST_APPEND(v_90, lstend_2, node_2);

      _fx_catch_36: ;
         _fx_free_T2R9Ast__id_tN10Ast__typ_t(&tup_1);
         if (v_94) {
            _fx_free_N10Ast__typ_t(&v_94);
         }
         if (t_0) {
            _fx_free_N10Ast__typ_t(&t_0);
         }
         FX_CHECK_EXN(_fx_catch_37);
      }
      _fx_make_R17Ast__defvariant_t(&v_93->dvar_name, v_93->dvar_templ_args, v_89, &v_93->dvar_flags, v_90, v_93->dvar_ctors,
         v_93->dvar_templ_inst, v_93->dvar_ifaces, v_93->dvar_scope, &v_93->dvar_loc, &v_91);
      _fx_R17Ast__defvariant_t* v_95 = &dvar_0->data;
      _fx_free_R17Ast__defvariant_t(v_95);
      _fx_copy_R17Ast__defvariant_t(&v_91, v_95);
      FX_COPY_PTR(e_0, fx_result);

   _fx_catch_37: ;
      _fx_free_R17Ast__defvariant_t(&v_91);
      if (v_90) {
         _fx_free_LT2R9Ast__id_tN10Ast__typ_t(&v_90);
      }
      if (v_89) {
         _fx_free_N10Ast__typ_t(&v_89);
      }
      if (dvar_alias_0) {
         _fx_free_N10Ast__typ_t(&dvar_alias_0);
      }
      if (dvar_cases_0) {
         _fx_free_LT2R9Ast__id_tN10Ast__typ_t(&dvar_cases_0);
      }
   }
   else if (tag_0 == 39) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else if (tag_0 == 40) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else if (tag_0 == 41) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else if (tag_0 == 42) {
      FX_COPY_PTR(e_0, fx_result);
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM16check_n_walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM11walk_elist_LN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LN10Ast__exp_t_data_t* el_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM18check_n_walk_elistLN10Ast__exp_t2LN10Ast__exp_tRM11ast_callb_t(el_0, callb_0, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM16check_n_walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM11walk_plist_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(
   struct _fx_LN10Ast__pat_t_data_t* pl_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM18check_n_walk_plistLN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(pl_0, callb_0, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM10walk_pe_l_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* pe_l_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LT2N10Ast__pat_tN10Ast__exp_t lstend_0 = 0;
   _fx_LT2N10Ast__pat_tN10Ast__exp_t lst_0 = pe_l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N10Ast__pat_t p_0 = 0;
      _fx_N10Ast__exp_t e_0 = 0;
      _fx_N10Ast__pat_t v_0 = 0;
      _fx_N10Ast__exp_t v_1 = 0;
      _fx_T2N10Ast__pat_tN10Ast__exp_t tup_0 = {0};
      _fx_T2N10Ast__pat_tN10Ast__exp_t* __pat___0 = &lst_0->hd;
      FX_COPY_PTR(__pat___0->t0, &p_0);
      FX_COPY_PTR(__pat___0->t1, &e_0);
      FX_CALL(_fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, callb_0, &v_0, 0), _fx_catch_0);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, &v_1, 0), _fx_catch_0);
      _fx_make_T2N10Ast__pat_tN10Ast__exp_t(v_0, v_1, &tup_0);
      _fx_LT2N10Ast__pat_tN10Ast__exp_t node_0 = 0;
      FX_CALL(_fx_cons_LT2N10Ast__pat_tN10Ast__exp_t(&tup_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      _fx_free_T2N10Ast__pat_tN10Ast__exp_t(&tup_0);
      if (v_1) {
         _fx_free_N10Ast__exp_t(&v_1);
      }
      if (v_0) {
         _fx_free_N10Ast__pat_t(&v_0);
      }
      if (e_0) {
         _fx_free_N10Ast__exp_t(&e_0);
      }
      if (p_0) {
         _fx_free_N10Ast__pat_t(&p_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM10walk_ne_l_LT2RM4id_tN10Ast__exp_t2LT2RM4id_tN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t* ne_l_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LT2R9Ast__id_tN10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LT2R9Ast__id_tN10Ast__exp_t lstend_0 = 0;
   _fx_LT2R9Ast__id_tN10Ast__exp_t lst_0 = ne_l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N10Ast__exp_t e_0 = 0;
      _fx_N10Ast__exp_t v_0 = 0;
      _fx_T2R9Ast__id_tN10Ast__exp_t tup_0 = {0};
      _fx_T2R9Ast__id_tN10Ast__exp_t* __pat___0 = &lst_0->hd;
      _fx_R9Ast__id_t n_0 = __pat___0->t0;
      FX_COPY_PTR(__pat___0->t1, &e_0);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, &v_0, 0), _fx_catch_0);
      _fx_make_T2R9Ast__id_tN10Ast__exp_t(&n_0, v_0, &tup_0);
      _fx_LT2R9Ast__id_tN10Ast__exp_t node_0 = 0;
      FX_CALL(_fx_cons_LT2R9Ast__id_tN10Ast__exp_t(&tup_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      _fx_free_T2R9Ast__id_tN10Ast__exp_t(&tup_0);
      if (v_0) {
         _fx_free_N10Ast__exp_t(&v_0);
      }
      if (e_0) {
         _fx_free_N10Ast__exp_t(&e_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM11walk_cases_LT2N10Ast__pat_tN10Ast__exp_t2LT2N10Ast__pat_tN10Ast__exp_tRM11ast_callb_t(
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t* pe_l_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LT2N10Ast__pat_tN10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_LT2N10Ast__pat_tN10Ast__exp_t lstend_0 = 0;
   _fx_LT2N10Ast__pat_tN10Ast__exp_t lst_0 = pe_l_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N10Ast__pat_t p_0 = 0;
      _fx_N10Ast__exp_t e_0 = 0;
      _fx_N10Ast__pat_t v_0 = 0;
      _fx_N10Ast__exp_t v_1 = 0;
      _fx_T2N10Ast__pat_tN10Ast__exp_t tup_0 = {0};
      _fx_T2N10Ast__pat_tN10Ast__exp_t* __pat___0 = &lst_0->hd;
      FX_COPY_PTR(__pat___0->t0, &p_0);
      FX_COPY_PTR(__pat___0->t1, &e_0);
      FX_CALL(_fx_M3AstFM9walk_pat_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, callb_0, &v_0, 0), _fx_catch_0);
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, &v_1, 0), _fx_catch_0);
      _fx_make_T2N10Ast__pat_tN10Ast__exp_t(v_0, v_1, &tup_0);
      _fx_LT2N10Ast__pat_tN10Ast__exp_t node_0 = 0;
      FX_CALL(_fx_cons_LT2N10Ast__pat_tN10Ast__exp_t(&tup_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      _fx_free_T2N10Ast__pat_tN10Ast__exp_t(&tup_0);
      if (v_1) {
         _fx_free_N10Ast__exp_t(&v_1);
      }
      if (v_0) {
         _fx_free_N10Ast__pat_t(&v_0);
      }
      if (e_0) {
         _fx_free_N10Ast__exp_t(&e_0);
      }
      if (p_0) {
         _fx_free_N10Ast__pat_t(&p_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM13walk_exp_opt_Nt6option1N10Ast__exp_t2Nt6option1N10Ast__exp_tRM11ast_callb_t(
   struct _fx_Nt6option1N10Ast__exp_t_data_t* e_opt_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_Nt6option1N10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   if ((e_opt_0 != 0) + 1 == 2) {
      _fx_N10Ast__exp_t v_0 = 0;
      FX_CALL(_fx_M3AstFM9walk_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_opt_0->u.Some, callb_0, &v_0, 0), _fx_catch_0);
      FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__exp_t1N10Ast__exp_t(v_0, fx_result), _fx_catch_0);

   _fx_catch_0: ;
      if (v_0) {
         _fx_free_N10Ast__exp_t(&v_0);
      }
   }
   else {
      FX_COPY_PTR(_fx_g11Ast__None3_, fx_result);
   }

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM9walk_ctx_T2N10Ast__typ_tRM5loc_t2T2N10Ast__typ_tRM5loc_tRM11ast_callb_t(
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* arg0_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_T2N10Ast__typ_tR10Ast__loc_t* fx_result,
   void* fx_fv)
{
   _fx_N10Ast__typ_t t_0 = 0;
   _fx_N10Ast__typ_t v_0 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(arg0_0->t0, &t_0);
   _fx_R10Ast__loc_t loc_0 = arg0_0->t1;
   FX_CALL(_fx_M3AstFM9walk_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, &v_0, 0), _fx_cleanup);
   _fx_make_T2N10Ast__typ_tR10Ast__loc_t(v_0, &loc_0, fx_result);

_fx_cleanup: ;
   if (t_0) {
      _fx_free_N10Ast__typ_t(&t_0);
   }
   if (v_0) {
      _fx_free_N10Ast__typ_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(p_0);
   if (tag_0 == 1) {
      FX_COPY_PTR(p_0, fx_result);
   }
   else if (tag_0 == 2) {
      FX_COPY_PTR(p_0, fx_result);
   }
   else if (tag_0 == 3) {
      FX_COPY_PTR(p_0, fx_result);
   }
   else if (tag_0 == 4) {
      _fx_LN10Ast__pat_t v_0 = 0;
      _fx_T2LN10Ast__pat_tR10Ast__loc_t* vcase_0 = &p_0->u.PatTuple;
      FX_CALL(_fx_M3AstFM8walk_pl_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(vcase_0->t0, callb_0, &v_0, 0), _fx_catch_0);
      FX_CALL(_fx_M3AstFM8PatTupleN10Ast__pat_t2LN10Ast__pat_tRM5loc_t(v_0, &vcase_0->t1, fx_result), _fx_catch_0);

   _fx_catch_0: ;
      if (v_0) {
         _fx_free_LN10Ast__pat_t(&v_0);
      }
   }
   else if (tag_0 == 5) {
      _fx_LN10Ast__pat_t v_1 = 0;
      _fx_T3R9Ast__id_tLN10Ast__pat_tR10Ast__loc_t* vcase_1 = &p_0->u.PatVariant;
      FX_CALL(_fx_M3AstFM8walk_pl_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(vcase_1->t1, callb_0, &v_1, 0), _fx_catch_1);
      FX_CALL(_fx_M3AstFM10PatVariantN10Ast__pat_t3RM4id_tLN10Ast__pat_tRM5loc_t(&vcase_1->t0, v_1, &vcase_1->t2, fx_result),
         _fx_catch_1);

   _fx_catch_1: ;
      if (v_1) {
         _fx_free_LN10Ast__pat_t(&v_1);
      }
   }
   else if (tag_0 == 6) {
      _fx_LT2R9Ast__id_tN10Ast__pat_t v_2 = 0;
      _fx_LT2R9Ast__id_tN10Ast__pat_t np_l_0 = 0;
      _fx_T3Nt6option1R9Ast__id_tLT2R9Ast__id_tN10Ast__pat_tR10Ast__loc_t* vcase_2 = &p_0->u.PatRecord;
      _fx_LT2R9Ast__id_tN10Ast__pat_t lstend_0 = 0;
      FX_COPY_PTR(vcase_2->t1, &np_l_0);
      _fx_LT2R9Ast__id_tN10Ast__pat_t lst_0 = np_l_0;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_N10Ast__pat_t p_1 = 0;
         _fx_N10Ast__pat_t v_3 = 0;
         _fx_T2R9Ast__id_tN10Ast__pat_t tup_0 = {0};
         _fx_T2R9Ast__id_tN10Ast__pat_t* __pat___0 = &lst_0->hd;
         _fx_R9Ast__id_t n_0 = __pat___0->t0;
         FX_COPY_PTR(__pat___0->t1, &p_1);
         FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_1, callb_0, &v_3, 0), _fx_catch_2);
         _fx_make_T2R9Ast__id_tN10Ast__pat_t(&n_0, v_3, &tup_0);
         _fx_LT2R9Ast__id_tN10Ast__pat_t node_0 = 0;
         FX_CALL(_fx_cons_LT2R9Ast__id_tN10Ast__pat_t(&tup_0, 0, false, &node_0), _fx_catch_2);
         FX_LIST_APPEND(v_2, lstend_0, node_0);

      _fx_catch_2: ;
         _fx_free_T2R9Ast__id_tN10Ast__pat_t(&tup_0);
         if (v_3) {
            _fx_free_N10Ast__pat_t(&v_3);
         }
         if (p_1) {
            _fx_free_N10Ast__pat_t(&p_1);
         }
         FX_CHECK_EXN(_fx_catch_3);
      }
      FX_CALL(
         _fx_M3AstFM9PatRecordN10Ast__pat_t3Nt6option1RM4id_tLT2RM4id_tN10Ast__pat_tRM5loc_t(&vcase_2->t0, v_2, &vcase_2->t2,
            fx_result), _fx_catch_3);

   _fx_catch_3: ;
      if (np_l_0) {
         _fx_free_LT2R9Ast__id_tN10Ast__pat_t(&np_l_0);
      }
      if (v_2) {
         _fx_free_LT2R9Ast__id_tN10Ast__pat_t(&v_2);
      }
   }
   else if (tag_0 == 7) {
      _fx_N10Ast__pat_t v_4 = 0;
      _fx_N10Ast__pat_t v_5 = 0;
      _fx_T3N10Ast__pat_tN10Ast__pat_tR10Ast__loc_t* vcase_3 = &p_0->u.PatCons;
      FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_3->t0, callb_0, &v_4, 0), _fx_catch_4);
      FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_3->t1, callb_0, &v_5, 0), _fx_catch_4);
      FX_CALL(_fx_M3AstFM7PatConsN10Ast__pat_t3N10Ast__pat_tN10Ast__pat_tRM5loc_t(v_4, v_5, &vcase_3->t2, fx_result),
         _fx_catch_4);

   _fx_catch_4: ;
      if (v_5) {
         _fx_free_N10Ast__pat_t(&v_5);
      }
      if (v_4) {
         _fx_free_N10Ast__pat_t(&v_4);
      }
   }
   else if (tag_0 == 8) {
      _fx_N10Ast__pat_t v_6 = 0;
      _fx_T3N10Ast__pat_tR9Ast__id_tR10Ast__loc_t* vcase_4 = &p_0->u.PatAs;
      FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_4->t0, callb_0, &v_6, 0), _fx_catch_5);
      FX_CALL(_fx_M3AstFM5PatAsN10Ast__pat_t3N10Ast__pat_tRM4id_tRM5loc_t(v_6, &vcase_4->t1, &vcase_4->t2, fx_result),
         _fx_catch_5);

   _fx_catch_5: ;
      if (v_6) {
         _fx_free_N10Ast__pat_t(&v_6);
      }
   }
   else if (tag_0 == 9) {
      _fx_N10Ast__pat_t v_7 = 0;
      _fx_N10Ast__typ_t v_8 = 0;
      _fx_T3N10Ast__pat_tN10Ast__typ_tR10Ast__loc_t* vcase_5 = &p_0->u.PatTyped;
      FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_5->t0, callb_0, &v_7, 0), _fx_catch_6);
      FX_CALL(_fx_M3AstFM11walk_typ_1_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(vcase_5->t1, callb_0, &v_8, 0), _fx_catch_6);
      FX_CALL(_fx_M3AstFM8PatTypedN10Ast__pat_t3N10Ast__pat_tN10Ast__typ_tRM5loc_t(v_7, v_8, &vcase_5->t2, fx_result),
         _fx_catch_6);

   _fx_catch_6: ;
      if (v_8) {
         _fx_free_N10Ast__typ_t(&v_8);
      }
      if (v_7) {
         _fx_free_N10Ast__pat_t(&v_7);
      }
   }
   else if (tag_0 == 10) {
      _fx_N10Ast__pat_t v_9 = 0;
      _fx_N10Ast__exp_t v_10 = 0;
      _fx_T3N10Ast__pat_tN10Ast__exp_tR10Ast__loc_t* vcase_6 = &p_0->u.PatWhen;
      FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_6->t0, callb_0, &v_9, 0), _fx_catch_7);
      FX_CALL(_fx_M3AstFM16check_n_walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(vcase_6->t1, callb_0, &v_10, 0),
         _fx_catch_7);
      FX_CALL(_fx_M3AstFM7PatWhenN10Ast__pat_t3N10Ast__pat_tN10Ast__exp_tRM5loc_t(v_9, v_10, &vcase_6->t2, fx_result),
         _fx_catch_7);

   _fx_catch_7: ;
      if (v_10) {
         _fx_free_N10Ast__exp_t(&v_10);
      }
      if (v_9) {
         _fx_free_N10Ast__pat_t(&v_9);
      }
   }
   else if (tag_0 == 11) {
      _fx_LN10Ast__pat_t v_11 = 0;
      _fx_T2LN10Ast__pat_tR10Ast__loc_t* vcase_7 = &p_0->u.PatAlt;
      FX_CALL(_fx_M3AstFM8walk_pl_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(vcase_7->t0, callb_0, &v_11, 0), _fx_catch_8);
      FX_CALL(_fx_M3AstFM6PatAltN10Ast__pat_t2LN10Ast__pat_tRM5loc_t(v_11, &vcase_7->t1, fx_result), _fx_catch_8);

   _fx_catch_8: ;
      if (v_11) {
         _fx_free_LN10Ast__pat_t(&v_11);
      }
   }
   else if (tag_0 == 12) {
      _fx_N10Ast__pat_t v_12 = 0;
      _fx_T2N10Ast__pat_tR10Ast__loc_t* vcase_8 = &p_0->u.PatRef;
      FX_CALL(_fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(vcase_8->t0, callb_0, &v_12, 0), _fx_catch_9);
      FX_CALL(_fx_M3AstFM6PatRefN10Ast__pat_t2N10Ast__pat_tRM5loc_t(v_12, &vcase_8->t1, fx_result), _fx_catch_9);

   _fx_catch_9: ;
      if (v_12) {
         _fx_free_N10Ast__pat_t(&v_12);
      }
   }
   else {
      FX_FAST_THROW(FX_EXN_NoMatchError, _fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM11walk_typ_1_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM16check_n_walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM11walk_pat_1_N10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM16check_n_walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

static int _fx_M3AstFM8walk_pl_LN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(
   struct _fx_LN10Ast__pat_t_data_t* pl_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_LN10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_CALL(_fx_M3AstFM18check_n_walk_plistLN10Ast__pat_t2LN10Ast__pat_tRM11ast_callb_t(pl_0, callb_0, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8dup_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt6option1N10Ast__typ_t v_0 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(t_0);
   if (tag_0 == 1) {
      FX_COPY_PTR(t_0->u.TypVar->data, &v_0);
      if ((v_0 != 0) + 1 == 2) {
         _fx_N10Ast__typ_t v_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_2 = 0;
         _fx_rNt6option1N10Ast__typ_t v_3 = 0;
         FX_CALL(_fx_M3AstFM8dup_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(v_0->u.Some, callb_0, &v_1, 0), _fx_catch_0);
         FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(v_1, &v_2), _fx_catch_0);
         FX_CALL(_fx_make_rNt6option1N10Ast__typ_t(v_2, &v_3), _fx_catch_0);
         FX_CALL(_fx_M3AstFM6TypVarN10Ast__typ_t1rNt6option1N10Ast__typ_t(v_3, fx_result), _fx_catch_0);

      _fx_catch_0: ;
         if (v_3) {
            _fx_free_rNt6option1N10Ast__typ_t(&v_3);
         }
         if (v_2) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_2);
         }
         if (v_1) {
            _fx_free_N10Ast__typ_t(&v_1);
         }
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 1) {
      _fx_rNt6option1N10Ast__typ_t v_4 = 0;
      FX_CALL(_fx_make_rNt6option1N10Ast__typ_t(_fx_g11Ast__None4_, &v_4), _fx_catch_1);
      FX_CALL(_fx_M3AstFM6TypVarN10Ast__typ_t1rNt6option1N10Ast__typ_t(v_4, fx_result), _fx_catch_1);

   _fx_catch_1: ;
      if (v_4) {
         _fx_free_rNt6option1N10Ast__typ_t(&v_4);
      }
      goto _fx_endmatch_0;
   }
   if (tag_0 == 20) {
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t relems_0 = 0;
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t new_relems_0 = 0;
      _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB v_5 = {0};
      _fx_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB v_6 = 0;
      _fx_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB* v_7 = &t_0->u.TypRecord->data;
      FX_COPY_PTR(v_7->t0, &relems_0);
      bool ordered_0 = v_7->t1;
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t lstend_0 = 0;
      _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t lst_0 = relems_0;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_R16Ast__val_flags_t flags_0 = {0};
         _fx_N10Ast__typ_t t_1 = 0;
         _fx_N10Ast__exp_t v_8 = 0;
         _fx_N10Ast__typ_t v_9 = 0;
         _fx_N10Ast__exp_t v_10 = 0;
         _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t tup_0 = {0};
         _fx_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t* __pat___0 = &lst_0->hd;
         _fx_copy_R16Ast__val_flags_t(&__pat___0->t0, &flags_0);
         _fx_R9Ast__id_t n_0 = __pat___0->t1;
         FX_COPY_PTR(__pat___0->t2, &t_1);
         FX_COPY_PTR(__pat___0->t3, &v_8);
         FX_CALL(_fx_M3AstFM8dup_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_1, callb_0, &v_9, 0), _fx_catch_2);
         FX_CALL(_fx_M3AstFM8dup_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_8, callb_0, &v_10, 0), _fx_catch_2);
         _fx_make_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&flags_0, &n_0, v_9, v_10, &tup_0);
         _fx_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t node_0 = 0;
         FX_CALL(_fx_cons_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&tup_0, 0, false, &node_0), _fx_catch_2);
         FX_LIST_APPEND(new_relems_0, lstend_0, node_0);

      _fx_catch_2: ;
         _fx_free_T4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&tup_0);
         if (v_10) {
            _fx_free_N10Ast__exp_t(&v_10);
         }
         if (v_9) {
            _fx_free_N10Ast__typ_t(&v_9);
         }
         if (v_8) {
            _fx_free_N10Ast__exp_t(&v_8);
         }
         if (t_1) {
            _fx_free_N10Ast__typ_t(&t_1);
         }
         _fx_free_R16Ast__val_flags_t(&flags_0);
         FX_CHECK_EXN(_fx_catch_3);
      }
      _fx_make_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(new_relems_0, ordered_0, &v_5);
      FX_CALL(_fx_make_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_5, &v_6), _fx_catch_3);
      FX_CALL(_fx_M3AstFM9TypRecordN10Ast__typ_t1rT2LT4RM11val_flags_tRM4id_tN10Ast__typ_tN10Ast__exp_tB(v_6, fx_result),
         _fx_catch_3);

   _fx_catch_3: ;
      if (v_6) {
         _fx_free_rT2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_6);
      }
      _fx_free_T2LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_tB(&v_5);
      if (new_relems_0) {
         _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&new_relems_0);
      }
      if (relems_0) {
         _fx_free_LT4R16Ast__val_flags_tR9Ast__id_tN10Ast__typ_tN10Ast__exp_t(&relems_0);
      }
      goto _fx_endmatch_0;
   }
   FX_CALL(_fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, callb_0, fx_result, 0), _fx_catch_4);

_fx_catch_4: ;

_fx_endmatch_0: ;

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt6option1N10Ast__typ_t(&v_0);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8dup_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   int tag_0 = FX_REC_VARIANT_TAG(e_0);
   if (tag_0 == 35) {
      _fx_R13Ast__deffun_t v_0 = {0};
      _fx_rR13Ast__deffun_t v_1 = 0;
      _fx_N10Ast__exp_t v_2 = 0;
      _fx_copy_R13Ast__deffun_t(&e_0->u.DefFun->data, &v_0);
      FX_CALL(_fx_make_rR13Ast__deffun_t(&v_0, &v_1), _fx_catch_0);
      FX_CALL(_fx_M3AstFM6DefFunN10Ast__exp_t1rRM8deffun_t(v_1, &v_2), _fx_catch_0);
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_2, callb_0, fx_result, 0), _fx_catch_0);

   _fx_catch_0: ;
      if (v_2) {
         _fx_free_N10Ast__exp_t(&v_2);
      }
      if (v_1) {
         _fx_free_rR13Ast__deffun_t(&v_1);
      }
      _fx_free_R13Ast__deffun_t(&v_0);
   }
   else if (tag_0 == 36) {
      _fx_R13Ast__defexn_t v_3 = {0};
      _fx_rR13Ast__defexn_t v_4 = 0;
      _fx_N10Ast__exp_t v_5 = 0;
      _fx_copy_R13Ast__defexn_t(&e_0->u.DefExn->data, &v_3);
      FX_CALL(_fx_make_rR13Ast__defexn_t(&v_3, &v_4), _fx_catch_1);
      FX_CALL(_fx_M3AstFM6DefExnN10Ast__exp_t1rRM8defexn_t(v_4, &v_5), _fx_catch_1);
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_5, callb_0, fx_result, 0), _fx_catch_1);

   _fx_catch_1: ;
      if (v_5) {
         _fx_free_N10Ast__exp_t(&v_5);
      }
      if (v_4) {
         _fx_free_rR13Ast__defexn_t(&v_4);
      }
      _fx_free_R13Ast__defexn_t(&v_3);
   }
   else if (tag_0 == 37) {
      _fx_R13Ast__deftyp_t v_6 = {0};
      _fx_rR13Ast__deftyp_t v_7 = 0;
      _fx_N10Ast__exp_t v_8 = 0;
      _fx_copy_R13Ast__deftyp_t(&e_0->u.DefTyp->data, &v_6);
      FX_CALL(_fx_make_rR13Ast__deftyp_t(&v_6, &v_7), _fx_catch_2);
      FX_CALL(_fx_M3AstFM6DefTypN10Ast__exp_t1rRM8deftyp_t(v_7, &v_8), _fx_catch_2);
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_8, callb_0, fx_result, 0), _fx_catch_2);

   _fx_catch_2: ;
      if (v_8) {
         _fx_free_N10Ast__exp_t(&v_8);
      }
      if (v_7) {
         _fx_free_rR13Ast__deftyp_t(&v_7);
      }
      _fx_free_R13Ast__deftyp_t(&v_6);
   }
   else if (tag_0 == 38) {
      _fx_R17Ast__defvariant_t v_9 = {0};
      _fx_rR17Ast__defvariant_t v_10 = 0;
      _fx_N10Ast__exp_t v_11 = 0;
      _fx_copy_R17Ast__defvariant_t(&e_0->u.DefVariant->data, &v_9);
      FX_CALL(_fx_make_rR17Ast__defvariant_t(&v_9, &v_10), _fx_catch_3);
      FX_CALL(_fx_M3AstFM10DefVariantN10Ast__exp_t1rRM12defvariant_t(v_10, &v_11), _fx_catch_3);
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_11, callb_0, fx_result, 0), _fx_catch_3);

   _fx_catch_3: ;
      if (v_11) {
         _fx_free_N10Ast__exp_t(&v_11);
      }
      if (v_10) {
         _fx_free_rR17Ast__defvariant_t(&v_10);
      }
      _fx_free_R17Ast__defvariant_t(&v_9);
   }
   else if (tag_0 == 39) {
      _fx_R19Ast__definterface_t v_12 = {0};
      _fx_rR19Ast__definterface_t v_13 = 0;
      _fx_N10Ast__exp_t v_14 = 0;
      _fx_copy_R19Ast__definterface_t(&e_0->u.DefInterface->data, &v_12);
      FX_CALL(_fx_make_rR19Ast__definterface_t(&v_12, &v_13), _fx_catch_4);
      FX_CALL(_fx_M3AstFM12DefInterfaceN10Ast__exp_t1rRM14definterface_t(v_13, &v_14), _fx_catch_4);
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(v_14, callb_0, fx_result, 0), _fx_catch_4);

   _fx_catch_4: ;
      if (v_14) {
         _fx_free_N10Ast__exp_t(&v_14);
      }
      if (v_13) {
         _fx_free_rR19Ast__definterface_t(&v_13);
      }
      _fx_free_R19Ast__definterface_t(&v_12);
   }
   else {
      FX_CALL(_fx_M3AstFM8walk_expN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, callb_0, fx_result, 0), _fx_catch_5);

   _fx_catch_5: ;
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7dup_typN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM8dup_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_0, &_fx_g14Ast__dup_callb, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7dup_expN10Ast__exp_t1N10Ast__exp_t(
   struct _fx_N10Ast__exp_t_data_t* e_0,
   struct _fx_N10Ast__exp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM8dup_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(e_0, &_fx_g14Ast__dup_callb, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7dup_patN10Ast__pat_t1N10Ast__pat_t(
   struct _fx_N10Ast__pat_t_data_t* p_0,
   struct _fx_N10Ast__pat_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(_fx_M3AstFM8walk_patN10Ast__pat_t2N10Ast__pat_tRM11ast_callb_t(p_0, &_fx_g14Ast__dup_callb, fx_result, 0),
      _fx_cleanup);

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14deref_typ_rec_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N10Ast__typ_t t_1 = 0;
   int fx_status = 0;
   if (FX_REC_VARIANT_TAG(t_0) == 1) {
      _fx_N10Ast__typ_t v_0 = 0;
      _fx_N10Ast__typ_t result_0 = 0;
      _fx_N10Ast__typ_t t_2 = 0;
      _fx_N10Ast__typ_t root_0 = 0;
      FX_CALL(_fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(t_0, &v_0, 0), _fx_catch_3);
      FX_COPY_PTR(t_0, &t_2);
      FX_COPY_PTR(v_0, &root_0);
      for (;;) {
         _fx_N10Ast__typ_t t_3 = 0;
         _fx_N10Ast__typ_t root_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_2 = 0;
         FX_COPY_PTR(t_2, &t_3);
         FX_COPY_PTR(root_0, &root_1);
         if (FX_REC_VARIANT_TAG(t_3) == 1) {
            _fx_rNt6option1N10Ast__typ_t r_0 = t_3->u.TypVar;
            FX_COPY_PTR(r_0->data, &v_1);
            if ((v_1 != 0) + 1 == 2) {
               _fx_N10Ast__typ_t t1_0 = v_1->u.Some;
               if (FX_REC_VARIANT_TAG(t1_0) == 1) {
                  FX_COPY_PTR(t1_0->u.TypVar->data, &v_2);
                  if ((v_2 != 0) + 1 == 2) {
                     _fx_Nt6option1N10Ast__typ_t v_3 = 0;
                     FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(root_1, &v_3), _fx_catch_0);
                     _fx_Nt6option1N10Ast__typ_t* v_4 = &r_0->data;
                     _fx_free_Nt6option1N10Ast__typ_t(v_4);
                     FX_COPY_PTR(v_3, v_4);
                     _fx_free_N10Ast__typ_t(&t_2);
                     FX_COPY_PTR(t1_0, &t_2);
                     _fx_free_N10Ast__typ_t(&root_0);
                     FX_COPY_PTR(root_1, &root_0);

                  _fx_catch_0: ;
                     if (v_3) {
                        _fx_free_Nt6option1N10Ast__typ_t(&v_3);
                     }
                     goto _fx_endmatch_0;
                  }
               }
            }
         }
         _fx_free_N10Ast__typ_t(&result_0);
         FX_COPY_PTR(root_1, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         if (v_2) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_2);
         }
         if (v_1) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_1);
         }
         if (root_1) {
            _fx_free_N10Ast__typ_t(&root_1);
         }
         if (t_3) {
            _fx_free_N10Ast__typ_t(&t_3);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_3);
      }
      FX_COPY_PTR(result_0, &t_1);

   _fx_catch_3: ;
      if (root_0) {
         _fx_free_N10Ast__typ_t(&root_0);
      }
      if (t_2) {
         _fx_free_N10Ast__typ_t(&t_2);
      }
      if (result_0) {
         _fx_free_N10Ast__typ_t(&result_0);
      }
      if (v_0) {
         _fx_free_N10Ast__typ_t(&v_0);
      }
   }
   else {
      FX_COPY_PTR(t_0, &t_1);
   }
   FX_CHECK_EXN(_fx_cleanup);
   FX_CALL(_fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_1, callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   if (t_1) {
      _fx_free_N10Ast__typ_t(&t_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM13deref_typ_recN10Ast__typ_t1N10Ast__typ_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t deref_typ_rec__0 = {0};
   _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t v_0 = 0;
   _fx_R16Ast__ast_callb_t deref_callb_0 = {0};
   _fx_N10Ast__typ_t t_1 = 0;
   int fx_status = 0;
   _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t deref_typ_rec__fp_0 =
      { _fx_M3AstFM14deref_typ_rec_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t, 0 };
   FX_COPY_FP(&deref_typ_rec__fp_0, &deref_typ_rec__0);
   FX_CALL(
      _fx_M3AstFM4SomeNt6option1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
         &deref_typ_rec__0, &v_0), _fx_cleanup);
   _fx_make_R16Ast__ast_callb_t(v_0, _fx_g11Ast__None2_, _fx_g11Ast__None1_, &deref_callb_0);
   if (FX_REC_VARIANT_TAG(t_0) == 1) {
      _fx_N10Ast__typ_t v_1 = 0;
      _fx_N10Ast__typ_t result_0 = 0;
      _fx_N10Ast__typ_t t_2 = 0;
      _fx_N10Ast__typ_t root_0 = 0;
      FX_CALL(_fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(t_0, &v_1, 0), _fx_catch_3);
      FX_COPY_PTR(t_0, &t_2);
      FX_COPY_PTR(v_1, &root_0);
      for (;;) {
         _fx_N10Ast__typ_t t_3 = 0;
         _fx_N10Ast__typ_t root_1 = 0;
         _fx_Nt6option1N10Ast__typ_t v_2 = 0;
         _fx_Nt6option1N10Ast__typ_t v_3 = 0;
         FX_COPY_PTR(t_2, &t_3);
         FX_COPY_PTR(root_0, &root_1);
         if (FX_REC_VARIANT_TAG(t_3) == 1) {
            _fx_rNt6option1N10Ast__typ_t r_0 = t_3->u.TypVar;
            FX_COPY_PTR(r_0->data, &v_2);
            if ((v_2 != 0) + 1 == 2) {
               _fx_N10Ast__typ_t t1_0 = v_2->u.Some;
               if (FX_REC_VARIANT_TAG(t1_0) == 1) {
                  FX_COPY_PTR(t1_0->u.TypVar->data, &v_3);
                  if ((v_3 != 0) + 1 == 2) {
                     _fx_Nt6option1N10Ast__typ_t v_4 = 0;
                     FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(root_1, &v_4), _fx_catch_0);
                     _fx_Nt6option1N10Ast__typ_t* v_5 = &r_0->data;
                     _fx_free_Nt6option1N10Ast__typ_t(v_5);
                     FX_COPY_PTR(v_4, v_5);
                     _fx_free_N10Ast__typ_t(&t_2);
                     FX_COPY_PTR(t1_0, &t_2);
                     _fx_free_N10Ast__typ_t(&root_0);
                     FX_COPY_PTR(root_1, &root_0);

                  _fx_catch_0: ;
                     if (v_4) {
                        _fx_free_Nt6option1N10Ast__typ_t(&v_4);
                     }
                     goto _fx_endmatch_0;
                  }
               }
            }
         }
         _fx_free_N10Ast__typ_t(&result_0);
         FX_COPY_PTR(root_1, &result_0);
         FX_BREAK(_fx_catch_1);

      _fx_catch_1: ;

      _fx_endmatch_0: ;
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         if (v_3) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_3);
         }
         if (v_2) {
            _fx_free_Nt6option1N10Ast__typ_t(&v_2);
         }
         if (root_1) {
            _fx_free_N10Ast__typ_t(&root_1);
         }
         if (t_3) {
            _fx_free_N10Ast__typ_t(&t_3);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_3);
      }
      FX_COPY_PTR(result_0, &t_1);

   _fx_catch_3: ;
      if (root_0) {
         _fx_free_N10Ast__typ_t(&root_0);
      }
      if (t_2) {
         _fx_free_N10Ast__typ_t(&t_2);
      }
      if (result_0) {
         _fx_free_N10Ast__typ_t(&result_0);
      }
      if (v_1) {
         _fx_free_N10Ast__typ_t(&v_1);
      }
   }
   else {
      FX_COPY_PTR(t_0, &t_1);
   }
   FX_CHECK_EXN(_fx_cleanup);
   FX_CALL(_fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(t_1, &deref_callb_0, fx_result, 0), _fx_cleanup);

_fx_cleanup: ;
   FX_FREE_FP(&deref_typ_rec__0);
   if (v_0) {
      _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(&v_0);
   }
   _fx_free_R16Ast__ast_callb_t(&deref_callb_0);
   if (t_1) {
      _fx_free_N10Ast__typ_t(&t_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM12is_fixed_typB1N10Ast__typ_t(struct _fx_N10Ast__typ_t_data_t* t_0, bool* fx_result, void* fx_fv)
{
   _fx_rB is_fixed_ref_0 = 0;
   _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t is_fixed_typ__0 = {0};
   _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t v_0 = 0;
   _fx_R16Ast__ast_callb_t callb_0 = {0};
   _fx_N10Ast__typ_t res_0 = 0;
   int fx_status = 0;
   FX_CALL(_fx_make_rB(true, &is_fixed_ref_0), _fx_cleanup);
   _fx_M3AstFM7make_fpFPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1rB(is_fixed_ref_0, &is_fixed_typ__0);
   FX_CALL(
      _fx_M3AstFM4SomeNt6option1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
         &is_fixed_typ__0, &v_0), _fx_cleanup);
   _fx_make_R16Ast__ast_callb_t(v_0, _fx_g11Ast__None2_, _fx_g11Ast__None1_, &callb_0);
   FX_CALL(is_fixed_typ__0.fp(t_0, &callb_0, &res_0, is_fixed_typ__0.fcv), _fx_cleanup);
   *fx_result = is_fixed_ref_0->data;

_fx_cleanup: ;
   FX_FREE_REF_SIMPLE(&is_fixed_ref_0);
   FX_FREE_FP(&is_fixed_typ__0);
   if (v_0) {
      _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(&v_0);
   }
   _fx_free_R16Ast__ast_callb_t(&callb_0);
   if (res_0) {
      _fx_free_N10Ast__typ_t(&res_0);
   }
   return fx_status;
}

static int _fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
   struct _fx_N10Ast__typ_t_data_t* t_0,
   struct _fx_R16Ast__ast_callb_t* callb_0,
   struct _fx_N10Ast__typ_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N10Ast__typ_t v_0 = 0;
   _fx_Nt6option1N10Ast__typ_t v_1 = 0;
   int fx_status = 0;
   _fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t_cldata_t* cv_0 =
      (_fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t_cldata_t*)fx_fv;
   bool* is_fixed_0 = &cv_0->t0->data;
   if (*is_fixed_0) {
      if (FX_REC_VARIANT_TAG(t_0) == 1) {
         _fx_N10Ast__typ_t v_2 = 0;
         _fx_N10Ast__typ_t result_0 = 0;
         _fx_N10Ast__typ_t t_1 = 0;
         _fx_N10Ast__typ_t root_0 = 0;
         FX_CALL(_fx_M3AstFM9find_rootN10Ast__typ_t1N10Ast__typ_t(t_0, &v_2, 0), _fx_catch_3);
         FX_COPY_PTR(t_0, &t_1);
         FX_COPY_PTR(v_2, &root_0);
         for (;;) {
            _fx_N10Ast__typ_t t_2 = 0;
            _fx_N10Ast__typ_t root_1 = 0;
            _fx_Nt6option1N10Ast__typ_t v_3 = 0;
            _fx_Nt6option1N10Ast__typ_t v_4 = 0;
            FX_COPY_PTR(t_1, &t_2);
            FX_COPY_PTR(root_0, &root_1);
            if (FX_REC_VARIANT_TAG(t_2) == 1) {
               _fx_rNt6option1N10Ast__typ_t r_0 = t_2->u.TypVar;
               FX_COPY_PTR(r_0->data, &v_3);
               if ((v_3 != 0) + 1 == 2) {
                  _fx_N10Ast__typ_t t1_0 = v_3->u.Some;
                  if (FX_REC_VARIANT_TAG(t1_0) == 1) {
                     FX_COPY_PTR(t1_0->u.TypVar->data, &v_4);
                     if ((v_4 != 0) + 1 == 2) {
                        _fx_Nt6option1N10Ast__typ_t v_5 = 0;
                        FX_CALL(_fx_M3AstFM4SomeNt6option1N10Ast__typ_t1N10Ast__typ_t(root_1, &v_5), _fx_catch_0);
                        _fx_Nt6option1N10Ast__typ_t* v_6 = &r_0->data;
                        _fx_free_Nt6option1N10Ast__typ_t(v_6);
                        FX_COPY_PTR(v_5, v_6);
                        _fx_free_N10Ast__typ_t(&t_1);
                        FX_COPY_PTR(t1_0, &t_1);
                        _fx_free_N10Ast__typ_t(&root_0);
                        FX_COPY_PTR(root_1, &root_0);

                     _fx_catch_0: ;
                        if (v_5) {
                           _fx_free_Nt6option1N10Ast__typ_t(&v_5);
                        }
                        goto _fx_endmatch_0;
                     }
                  }
               }
            }
            _fx_free_N10Ast__typ_t(&result_0);
            FX_COPY_PTR(root_1, &result_0);
            FX_BREAK(_fx_catch_1);

         _fx_catch_1: ;

         _fx_endmatch_0: ;
            FX_CHECK_EXN(_fx_catch_2);

         _fx_catch_2: ;
            if (v_4) {
               _fx_free_Nt6option1N10Ast__typ_t(&v_4);
            }
            if (v_3) {
               _fx_free_Nt6option1N10Ast__typ_t(&v_3);
            }
            if (root_1) {
               _fx_free_N10Ast__typ_t(&root_1);
            }
            if (t_2) {
               _fx_free_N10Ast__typ_t(&t_2);
            }
            FX_CHECK_BREAK();
            FX_CHECK_EXN(_fx_catch_3);
         }
         FX_COPY_PTR(result_0, &v_0);

      _fx_catch_3: ;
         if (root_0) {
            _fx_free_N10Ast__typ_t(&root_0);
         }
         if (t_1) {
            _fx_free_N10Ast__typ_t(&t_1);
         }
         if (result_0) {
            _fx_free_N10Ast__typ_t(&result_0);
         }
         if (v_2) {
            _fx_free_N10Ast__typ_t(&v_2);
         }
      }
      else {
         FX_COPY_PTR(t_0, &v_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
      if (FX_REC_VARIANT_TAG(v_0) == 1) {
         FX_COPY_PTR(v_0->u.TypVar->data, &v_1);
         if ((v_1 != 0) + 1 == 1) {
            *is_fixed_0 = false; FX_COPY_PTR(t_0, fx_result); goto _fx_endmatch_1;
         }
      }
      FX_CALL(_fx_M3AstFM8walk_typN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(v_0, callb_0, fx_result, 0), _fx_catch_4);

   _fx_catch_4: ;

   _fx_endmatch_1: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   else {
      FX_COPY_PTR(t_0, fx_result);
   }

_fx_cleanup: ;
   if (v_0) {
      _fx_free_N10Ast__typ_t(&v_0);
   }
   if (v_1) {
      _fx_free_Nt6option1N10Ast__typ_t(&v_1);
   }
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM7make_fpFPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1rB(
   struct _fx_rB_data_t* arg0,
   struct _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t_cldata_t,
      _fx_free_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t,
      _fx_M3AstFM13is_fixed_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   return 0;
}

FX_EXTERN_C int _fx_M3AstFM17calc_sets_closurei3iLRM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_t(
   int_ iters_0,
   struct _fx_LR9Ast__id_t_data_t* all_ids_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* all_sets_0,
   int_* fx_result,
   void* fx_fv)
{
   _fx_LR9Ast__id_t all_ids_1 = 0;
   fx_arr_t v_0 = {0};
   fx_arr_t v_1 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t visited_ids_0 = 0;
   fx_arr_t v_2 = {0};
   fx_arr_t v_3 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t empty_idset_0 = 0;
   fx_str_t fname_0 = {0};
   fx_str_t v_4 = {0};
   fx_str_t v_5 = {0};
   fx_str_t whole_msg_0 = {0};
   _fx_LS all_compile_err_ctx_0 = 0;
   fx_str_t whole_msg_1 = {0};
   fx_exn_t v_6 = {0};
   int fx_status = 0;
   int_ done_i_0 = -1;
   FX_COPY_PTR(all_ids_0, &all_ids_1);
   int_ size_0 = 8;
   while (size_0 < 256) {
      size_0 = size_0 * 2;
   }
   int_ idxsize_0 = size_0 * 2;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry0_0 = { 0ULL, _fx_g9Ast__noid };
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_0, &v_0, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_0 = 0;
   int_ n_0 = size_0;
   {
      const int_ shape_0[] = { n_0 };
      FX_CALL(fx_make_arr(1, shape_0, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &v_1), _fx_cleanup);
   }
   dstptr_0 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)v_1.data;
   for (int_ i_0 = 0; i_0 < n_0; i_0++, dstptr_0++) {
      *dstptr_0 = entry0_0;
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashset__t1RM4id_t6Rt24Hashset__hashset_entry_t1RM4id_tiiiA1iA1Rt24Hashset__hashset_entry_t1RM4id_t(
         &entry0_0, 0, 0, 0, &v_0, &v_1, &visited_ids_0), _fx_cleanup);
   int_ size_1 = 8;
   while (size_1 < 1) {
      size_1 = size_1 * 2;
   }
   int_ idxsize_1 = size_1 * 2;
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry0_1 = { 0ULL, _fx_g9Ast__noid };
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(idxsize_1, &v_2, 0), _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* dstptr_1 = 0;
   int_ n_1 = size_1;
   {
      const int_ shape_1[] = { n_1 };
      FX_CALL(fx_make_arr(1, shape_1, sizeof(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t), 0, 0, 0, &v_3), _fx_cleanup);
   }
   dstptr_1 = (_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t*)v_3.data;
   for (int_ i_1 = 0; i_1 < n_1; i_1++, dstptr_1++) {
      *dstptr_1 = entry0_1;
   }
   FX_CALL(
      _fx_M3AstFM1tNt10Hashset__t1RM4id_t6Rt24Hashset__hashset_entry_t1RM4id_tiiiA1iA1Rt24Hashset__hashset_entry_t1RM4id_t(
         &entry0_1, 0, 0, 0, &v_2, &v_3, &empty_idset_0), _fx_cleanup);
   for (int_ iter_0 = 0; iter_0 < iters_0; iter_0++) {
      _fx_rB changed_ref_0 = 0;
      _fx_LR9Ast__id_t __fold_result___0 = 0;
      _fx_LR9Ast__id_t v_7 = 0;
      fx_arr_t table_0 = {0};
      fx_arr_t v_8 = {0};
      FX_CALL(_fx_make_rB(false, &changed_ref_0), _fx_catch_2);
      _fx_LR9Ast__id_t lst_0 = all_ids_1;
      for (; lst_0; lst_0 = lst_0->tl) {
         _fx_Nt10Hashset__t1R9Ast__id_t res_0 = 0;
         _fx_R9Ast__id_t* n_2 = &lst_0->hd;
         FX_CALL(
            _fx_M3AstFM11update_setsNt10Hashset__t1RM4id_t5RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
               n_2, all_sets_0, changed_ref_0, empty_idset_0, visited_ids_0, &res_0, 0), _fx_catch_0);

      _fx_catch_0: ;
         if (res_0) {
            _fx_free_Nt10Hashset__t1R9Ast__id_t(&res_0);
         }
         FX_CHECK_EXN(_fx_catch_2);
      }
      if (!changed_ref_0->data) {
         done_i_0 = iter_0 + 1; FX_BREAK(_fx_catch_2);
      }
      _fx_LR9Ast__id_t lst_1 = all_ids_1;
      for (; lst_1; lst_1 = lst_1->tl) {
         _fx_LR9Ast__id_t r_0 = 0;
         _fx_R9Ast__id_t* a_0 = &lst_1->hd;
         FX_COPY_PTR(__fold_result___0, &r_0);
         FX_CALL(_fx_cons_LR9Ast__id_t(a_0, r_0, false, &r_0), _fx_catch_1);
         FX_FREE_LIST_SIMPLE(&__fold_result___0);
         FX_COPY_PTR(r_0, &__fold_result___0);

      _fx_catch_1: ;
         FX_FREE_LIST_SIMPLE(&r_0);
         FX_CHECK_EXN(_fx_catch_2);
      }
      FX_COPY_PTR(__fold_result___0, &v_7);
      FX_FREE_LIST_SIMPLE(&all_ids_1);
      FX_COPY_PTR(v_7, &all_ids_1);
      _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t entry0_2 = visited_ids_0->u.t.t0;
      fx_copy_arr(&visited_ids_0->u.t.t5, &table_0);
      int_ v_9 = FX_ARR_SIZE(table_0, 0);
      FX_CHKIDX_RANGE(FX_ARR_SIZE(table_0, 0), 0, v_9, 1, 1, 0, _fx_catch_2);
      _fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t* ptr_0 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, 0);
      for (int_ i_2 = 0; i_2 < v_9; i_2++) {
         ptr_0[i_2] = entry0_2;
      }
      visited_ids_0->u.t.t1 = 0;
      visited_ids_0->u.t.t2 = 0;
      visited_ids_0->u.t.t3 = 0;
      FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(FX_ARR_SIZE(table_0, 0) * 2, &v_8, 0), _fx_catch_2);
      fx_arr_t* v_10 = &visited_ids_0->u.t.t4;
      FX_FREE_ARR(v_10);
      fx_copy_arr(&v_8, v_10);

   _fx_catch_2: ;
      FX_FREE_ARR(&v_8);
      FX_FREE_ARR(&table_0);
      FX_FREE_LIST_SIMPLE(&v_7);
      FX_FREE_LIST_SIMPLE(&__fold_result___0);
      FX_FREE_REF_SIMPLE(&changed_ref_0);
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   if (done_i_0 <= 0) {
      if (_fx_g10Ast__noloc.m_idx >= 0) {
         int_ v_11 = _fx_g10Ast__noloc.m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_11), _fx_cleanup);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_11))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_4, 0), _fx_cleanup);
      FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_5, 0), _fx_cleanup);
      fx_str_t slit_1 = FX_MAKE_STR(":");
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(": error: calculation of sets\' closures takes too much iterations");
      {
         const fx_str_t strs_0[] = { fname_0, slit_1, v_4, slit_2, v_5, slit_3 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_cleanup);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_12 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_12), _fx_catch_3);
         fx_str_t slit_4 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_4, v_12, &whole_msg_1, 0), _fx_catch_3);

      _fx_catch_3: ;
         if (v_12) {
            _fx_free_LS(&v_12);
         }
      }
      FX_CHECK_EXN(_fx_cleanup);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_6), _fx_cleanup);
      FX_THROW(&v_6, true, _fx_cleanup);
   }
   *fx_result = done_i_0;

_fx_cleanup: ;
   FX_FREE_LIST_SIMPLE(&all_ids_1);
   FX_FREE_ARR(&v_0);
   FX_FREE_ARR(&v_1);
   if (visited_ids_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&visited_ids_0);
   }
   FX_FREE_ARR(&v_2);
   FX_FREE_ARR(&v_3);
   if (empty_idset_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&empty_idset_0);
   }
   FX_FREE_STR(&fname_0);
   FX_FREE_STR(&v_4);
   FX_FREE_STR(&v_5);
   FX_FREE_STR(&whole_msg_0);
   if (all_compile_err_ctx_0) {
      _fx_free_LS(&all_compile_err_ctx_0);
   }
   FX_FREE_STR(&whole_msg_1);
   fx_free_exn(&v_6);
   return fx_status;
}

static int
   _fx_M3AstFM11update_setsNt10Hashset__t1RM4id_t5RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* all_sets_0,
   struct _fx_rB_data_t* changed_ref_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* empty_idset_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* visited_ids_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt6option1Nt10Hashset__t1R9Ast__id_t v_0 = {0};
   _fx_Nt10Hashset__t1R9Ast__id_t v_1 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   _fx_Ta2i v_2;
   FX_CALL(_fx_M3AstFM9find_idx_Ta2i2Nt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_tRM4id_t(all_sets_0, n_0, &v_2, 0),
      _fx_cleanup);
   int_ j_0 = v_2.t1;
   if (j_0 >= 0) {
      FX_CHKIDX(FX_CHKIDX1(all_sets_0->u.t.t5, 0, j_0), _fx_cleanup);
      FX_COPY_PTR(FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t, all_sets_0->u.t.t5, j_0)->data,
         &v_1);
      _fx_M3AstFM4SomeNt6option1Nt10Hashset__t1RM4id_t1Nt10Hashset__t1RM4id_t(v_1, &v_0);
   }
   else {
      _fx_copy_Nt6option1Nt10Hashset__t1R9Ast__id_t(&_fx_g9Ast__None, &v_0);
   }
   if (v_0.tag == 2) {
      fx_arr_t table_0 = {0};
      _fx_Nt10Hashset__t1R9Ast__id_t set_n_0 = v_0.u.Some;
      uint64_t __fold_result___0 = 14695981039346656037ULL;
      uint64_t h_0 = __fold_result___0 ^ ((uint64_t)n_0->m ^ 14695981039346656037ULL);
      __fold_result___0 = h_0 * 1099511628211ULL;
      uint64_t h_1 = __fold_result___0 ^ ((uint64_t)n_0->i ^ 14695981039346656037ULL);
      __fold_result___0 = h_1 * 1099511628211ULL;
      uint64_t h_2 = __fold_result___0 ^ ((uint64_t)n_0->j ^ 14695981039346656037ULL);
      __fold_result___0 = h_2 * 1099511628211ULL;
      _fx_Ta2i v_3;
      FX_CALL(
         _fx_M3AstFM9find_idx_Ta2i3Nt10Hashset__t1RM4id_tRM4id_tq(visited_ids_0, n_0,
            __fold_result___0 & 9223372036854775807ULL, &v_3, 0), _fx_catch_1);
      if (v_3.t1 >= 0) {
         FX_COPY_PTR(set_n_0, fx_result);
      }
      else {
         uint64_t __fold_result___1 = 14695981039346656037ULL;
         uint64_t h_3 = __fold_result___1 ^ ((uint64_t)n_0->m ^ 14695981039346656037ULL);
         __fold_result___1 = h_3 * 1099511628211ULL;
         uint64_t h_4 = __fold_result___1 ^ ((uint64_t)n_0->i ^ 14695981039346656037ULL);
         __fold_result___1 = h_4 * 1099511628211ULL;
         uint64_t h_5 = __fold_result___1 ^ ((uint64_t)n_0->j ^ 14695981039346656037ULL);
         __fold_result___1 = h_5 * 1099511628211ULL;
         FX_CALL(
            _fx_M3AstFM4add_v3Nt10Hashset__t1RM4id_tRM4id_tq(visited_ids_0, n_0, __fold_result___1 & 9223372036854775807ULL, 0),
            _fx_catch_1);
         int_ size0_0 = set_n_0->u.t.t1;
         fx_copy_arr(&set_n_0->u.t.t5, &table_0);
         int_ v_4 = set_n_0->u.t.t2;
         for (int_ j_1 = 0; j_1 < v_4; j_1++) {
            FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_1), _fx_catch_0);
            if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_1)->hv < 9223372036854775808ULL) {
               FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_1), _fx_catch_0);
               _fx_R9Ast__id_t v_5 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_1)->key;
               FX_CALL(
                  _fx_M3AstFM10__lambda__v7RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tRM4id_tNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
                     &v_5, all_sets_0, changed_ref_0, empty_idset_0, n_0, set_n_0, visited_ids_0, 0), _fx_catch_0);
            }

         _fx_catch_0: ;
            FX_CHECK_EXN(_fx_catch_1);
         }
         int_ size1_0 = set_n_0->u.t.t1;
         if (size1_0 != size0_0) {
            changed_ref_0->data = true;
         }
         FX_COPY_PTR(set_n_0, fx_result);
      }

   _fx_catch_1: ;
      FX_FREE_ARR(&table_0);
   }
   else {
      FX_COPY_PTR(empty_idset_0, fx_result);
   }

_fx_cleanup: ;
   _fx_free_Nt6option1Nt10Hashset__t1R9Ast__id_t(&v_0);
   if (v_1) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&v_1);
   }
   return fx_status;
}

static int
   _fx_M3AstFM10__lambda__v7RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tRM4id_tNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
   struct _fx_R9Ast__id_t* m_0,
   struct _fx_Nt10Hashmap__t2R9Ast__id_tNt10Hashset__t1R9Ast__id_t_data_t* all_sets_0,
   struct _fx_rB_data_t* changed_ref_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* empty_idset_0,
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* set_n_0,
   struct _fx_Nt10Hashset__t1R9Ast__id_t_data_t* visited_ids_0,
   void* fx_fv)
{
   _fx_Nt10Hashset__t1R9Ast__id_t set_m_0 = 0;
   fx_arr_t table_0 = {0};
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   bool t_0;
   if ((bool)((m_0->m == n_0->m) & (m_0->i == n_0->i))) {
      t_0 = (bool)((m_0->m == 0) | (m_0->j == n_0->j));
   }
   else {
      t_0 = false;
   }
   if (!t_0) {
      FX_CALL(
         _fx_M3AstFM11update_setsNt10Hashset__t1RM4id_t5RM4id_tNt10Hashmap__t2RM4id_tNt10Hashset__t1RM4id_trBNt10Hashset__t1RM4id_tNt10Hashset__t1RM4id_t(
            m_0, all_sets_0, changed_ref_0, empty_idset_0, visited_ids_0, &set_m_0, 0), _fx_cleanup);
      fx_copy_arr(&set_m_0->u.t.t5, &table_0);
      int_ v_0 = set_m_0->u.t.t2;
      for (int_ j_0 = 0; j_0 < v_0; j_0++) {
         FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
         if (FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv < 9223372036854775808ULL) {
            FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
            _fx_R9Ast__id_t v_1 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->key;
            FX_CHKIDX(FX_CHKIDX1(table_0, 0, j_0), _fx_catch_0);
            FX_CALL(
               _fx_M3AstFM4add_v3Nt10Hashset__t1RM4id_tRM4id_tq(set_n_0, &v_1,
                  FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1R9Ast__id_t, table_0, j_0)->hv, 0), _fx_catch_0);
         }

      _fx_catch_0: ;
         FX_CHECK_EXN(_fx_cleanup);
      }
   }

_fx_cleanup: ;
   if (set_m_0) {
      _fx_free_Nt10Hashset__t1R9Ast__id_t(&set_m_0);
   }
   FX_FREE_ARR(&table_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM9get_ifacerRM14definterface_t2RM4id_tRM5loc_t(
   struct _fx_R9Ast__id_t* iface_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_rR19Ast__definterface_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N14Ast__id_info_t v_0 = {0};
   int fx_status = 0;
   if (iface_0->m == 0) {
      _fx_copy_N14Ast__id_info_t(&_fx_g11Ast__IdNone, &v_0);
   }
   else {
      _fx_Ta2i v_1;
      FX_CALL(_fx_M3AstFM7id2idx_Ta2i2RM4id_tRM5loc_t(iface_0, loc_0, &v_1, 0), _fx_cleanup);
      int_ m_0 = v_1.t0;
      int_ j_0 = v_1.t1;
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, m_0), _fx_cleanup);
      FX_CHKIDX(
         FX_CHKIDX1((*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t9->u.t.t1, 0, j_0),
         _fx_cleanup);
      _fx_copy_N14Ast__id_info_t(
         FX_PTR_1D(_fx_N14Ast__id_info_t,
            (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, m_0))->u.defmodule_t.t9->u.t.t1, j_0), &v_0);
   }
   if (v_0.tag == 7) {
      FX_COPY_PTR(v_0.u.IdInterface, fx_result);
   }
   else {
      fx_str_t v_2 = {0};
      fx_str_t fname_0 = {0};
      fx_str_t v_3 = {0};
      fx_str_t v_4 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_5 = {0};
      bool t_0;
      if ((bool)((iface_0->m == _fx_g9Ast__noid.m) & (iface_0->i == _fx_g9Ast__noid.i))) {
         t_0 = (bool)((iface_0->m == 0) | (iface_0->j == _fx_g9Ast__noid.j));
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         fx_str_t slit_0 = FX_MAKE_STR("<noid>"); fx_copy_str(&slit_0, &v_2);
      }
      else {
         int_ v_6 = iface_0->i;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, v_6), _fx_catch_1);
         fx_copy_str(FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, v_6), &v_2);
      }
      if (loc_0->m_idx >= 0) {
         int_ v_7 = loc_0->m_idx;
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_7), _fx_catch_1);
         fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_7))->u.defmodule_t.t1, &fname_0);
      }
      else {
         fx_str_t slit_1 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_1, &fname_0);
      }
      FX_CALL(_fx_F6stringS1i(loc_0->line0, &v_3, 0), _fx_catch_1);
      FX_CALL(_fx_F6stringS1i(loc_0->col0, &v_4, 0), _fx_catch_1);
      fx_str_t slit_2 = FX_MAKE_STR(":");
      fx_str_t slit_3 = FX_MAKE_STR(":");
      fx_str_t slit_4 = FX_MAKE_STR(": error: \'");
      fx_str_t slit_5 = FX_MAKE_STR("\' is not an interface");
      {
         const fx_str_t strs_0[] = { fname_0, slit_2, v_3, slit_3, v_4, slit_4, v_2, slit_5 };
         FX_CALL(fx_strjoin(0, 0, 0, strs_0, 8, &whole_msg_0), _fx_catch_1);
      }
      FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
      if (all_compile_err_ctx_0 == 0) {
         fx_copy_str(&whole_msg_0, &whole_msg_1);
      }
      else {
         _fx_LS v_8 = 0;
         FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_8), _fx_catch_0);
         fx_str_t slit_6 =
            FX_MAKE_STR("\n"
               U"\t");
         FX_CALL(_fx_F4joinS2SLS(&slit_6, v_8, &whole_msg_1, 0), _fx_catch_0);

      _fx_catch_0: ;
         if (v_8) {
            _fx_free_LS(&v_8);
         }
      }
      FX_CHECK_EXN(_fx_catch_1);
      FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(loc_0, &whole_msg_1, &v_5), _fx_catch_1);
      FX_THROW(&v_5, true, _fx_catch_1);

   _fx_catch_1: ;
      fx_free_exn(&v_5);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_4);
      FX_FREE_STR(&v_3);
      FX_FREE_STR(&fname_0);
      FX_FREE_STR(&v_2);
   }

_fx_cleanup: ;
   _fx_free_N14Ast__id_info_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM14same_or_parentB3RM4id_tRM4id_tRM5loc_t(
   struct _fx_R9Ast__id_t* iface_0,
   struct _fx_R9Ast__id_t* maybe_parent_0,
   struct _fx_R10Ast__loc_t* loc_0,
   bool* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   bool result_0 = 0;
   _fx_R9Ast__id_t iface_1 = *iface_0;
   _fx_R9Ast__id_t maybe_parent_1 = *maybe_parent_0;
   _fx_R10Ast__loc_t loc_1 = *loc_0;
   for (;;) {
      _fx_rR19Ast__definterface_t v_0 = 0;
      _fx_R9Ast__id_t iface_2 = iface_1;
      _fx_R9Ast__id_t maybe_parent_2 = maybe_parent_1;
      _fx_R10Ast__loc_t loc_2 = loc_1;
      bool t_0;
      if ((bool)((iface_2.m == maybe_parent_2.m) & (iface_2.i == maybe_parent_2.i))) {
         t_0 = (bool)((iface_2.m == 0) | (iface_2.j == maybe_parent_2.j));
      }
      else {
         t_0 = false;
      }
      if (t_0) {
         result_0 = true; FX_BREAK(_fx_catch_0);
      }
      else {
         FX_CALL(_fx_M3AstFM9get_ifacerRM14definterface_t2RM4id_tRM5loc_t(&iface_2, &loc_2, &v_0, 0), _fx_catch_0);
         _fx_R9Ast__id_t di_base_0 = v_0->data.di_base;
         bool t_1;
         if ((bool)((di_base_0.m == _fx_g9Ast__noid.m) & (di_base_0.i == _fx_g9Ast__noid.i))) {
            t_1 = (bool)((di_base_0.m == 0) | (di_base_0.j == _fx_g9Ast__noid.j));
         }
         else {
            t_1 = false;
         }
         if (t_1) {
            result_0 = false; FX_BREAK(_fx_catch_0);
         }
         else {
            iface_1 = di_base_0; maybe_parent_1 = maybe_parent_2; loc_1 = loc_2;
         }
      }

   _fx_catch_0: ;
      if (v_0) {
         _fx_free_rR19Ast__definterface_t(&v_0);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   *fx_result = result_0;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M3AstFM8init_allv0(void* fx_fv)
{
   fx_arr_t z_0 = {0};
   _fx_Rt20Hashmap__hashentry_t2Si entry0_0 = {0};
   fx_arr_t table_0 = {0};
   fx_arr_t v_0 = {0};
   _fx_Rt24Hashset__hashset_entry_t1S entry0_1 = {0};
   fx_arr_t table_1 = {0};
   fx_arr_t v_1 = {0};
   _fx_LS v_2 = 0;
   _fx_LS __fold_result___0 = 0;
   _fx_LS v_3 = 0;
   _fx_LR9Ast__id_t res_0 = 0;
   _fx_Rt20Hashmap__hashentry_t2Si entry0_2 = {0};
   fx_arr_t table_2 = {0};
   fx_arr_t v_4 = {0};
   fx_arr_t z_1 = {0};
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_0 = {0};
   _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t v_5 = {0};
   int fx_status = 0;
   _fx_g15Ast__freeze_ids = false;
   _fx_g14Ast__all_names->u.t.t0 = 0;
   fx_arr_t* v_6 = &_fx_g14Ast__all_names->u.t.t1;
   FX_FREE_ARR(v_6);
   fx_copy_arr(&z_0, v_6);
   _fx_copy_Rt20Hashmap__hashentry_t2Si(&_fx_g16Ast__all_strhash->u.t.t0, &entry0_0);
   fx_copy_arr(&_fx_g16Ast__all_strhash->u.t.t5, &table_0);
   int_ v_7 = FX_ARR_SIZE(table_0, 0);
   FX_CHKIDX_RANGE(FX_ARR_SIZE(table_0, 0), 0, v_7, 1, 1, 0, _fx_cleanup);
   _fx_Rt20Hashmap__hashentry_t2Si* ptr_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, table_0, 0);
   for (int_ i_0 = 0; i_0 < v_7; i_0++) {
      _fx_Rt20Hashmap__hashentry_t2Si* v_8 = ptr_0 + i_0;
      _fx_free_Rt20Hashmap__hashentry_t2Si(v_8);
      _fx_copy_Rt20Hashmap__hashentry_t2Si(&entry0_0, v_8);
   }
   _fx_g16Ast__all_strhash->u.t.t1 = 0;
   _fx_g16Ast__all_strhash->u.t.t2 = 0;
   _fx_g16Ast__all_strhash->u.t.t3 = 0;
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(FX_ARR_SIZE(table_0, 0) * 2, &v_0, 0), _fx_cleanup);
   fx_arr_t* v_9 = &_fx_g16Ast__all_strhash->u.t.t4;
   FX_FREE_ARR(v_9);
   fx_copy_arr(&v_0, v_9);
   _fx_copy_Rt24Hashset__hashset_entry_t1S(&_fx_g19Ast__all_c_inc_dirs->u.t.t0, &entry0_1);
   fx_copy_arr(&_fx_g19Ast__all_c_inc_dirs->u.t.t5, &table_1);
   int_ v_10 = FX_ARR_SIZE(table_1, 0);
   FX_CHKIDX_RANGE(FX_ARR_SIZE(table_1, 0), 0, v_10, 1, 1, 0, _fx_cleanup);
   _fx_Rt24Hashset__hashset_entry_t1S* ptr_1 = FX_PTR_1D(_fx_Rt24Hashset__hashset_entry_t1S, table_1, 0);
   for (int_ i_1 = 0; i_1 < v_10; i_1++) {
      _fx_Rt24Hashset__hashset_entry_t1S* v_11 = ptr_1 + i_1;
      _fx_free_Rt24Hashset__hashset_entry_t1S(v_11);
      _fx_copy_Rt24Hashset__hashset_entry_t1S(&entry0_1, v_11);
   }
   _fx_g19Ast__all_c_inc_dirs->u.t.t1 = 0;
   _fx_g19Ast__all_c_inc_dirs->u.t.t2 = 0;
   _fx_g19Ast__all_c_inc_dirs->u.t.t3 = 0;
   FX_CALL(_fx_M7HashsetFM9makeindexA1i1i(FX_ARR_SIZE(table_1, 0) * 2, &v_1, 0), _fx_cleanup);
   fx_arr_t* v_12 = &_fx_g19Ast__all_c_inc_dirs->u.t.t4;
   FX_FREE_ARR(v_12);
   fx_copy_arr(&v_1, v_12);
   FX_COPY_PTR(_fx_g19Ast__builtin_ids19_.t0, &v_2);
   _fx_LS lst_0 = v_2;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LS r_0 = 0;
      fx_str_t* a_0 = &lst_0->hd;
      FX_COPY_PTR(__fold_result___0, &r_0);
      FX_CALL(_fx_cons_LS(a_0, r_0, false, &r_0), _fx_catch_0);
      _fx_free_LS(&__fold_result___0);
      FX_COPY_PTR(r_0, &__fold_result___0);

   _fx_catch_0: ;
      if (r_0) {
         _fx_free_LS(&r_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(__fold_result___0, &v_3);
   _fx_LS lst_1 = v_3;
   for (; lst_1; lst_1 = lst_1->tl) {
      fx_arr_t v_13 = {0};
      fx_arr_t old_data_0 = {0};
      fx_str_t val0_0 = {0};
      fx_arr_t new_data_0 = {0};
      fx_str_t fname_0 = {0};
      fx_str_t v_14 = {0};
      fx_str_t v_15 = {0};
      fx_str_t whole_msg_0 = {0};
      _fx_LS all_compile_err_ctx_0 = 0;
      fx_str_t whole_msg_1 = {0};
      fx_exn_t v_16 = {0};
      fx_str_t* i_2 = &lst_1->hd;
      int_ h_idx_0;
      FX_CALL(_fx_M3AstFM18find_idx_or_inserti2Nt10Hashmap__t2SiS(_fx_g16Ast__all_strhash, i_2, &h_idx_0, 0), _fx_catch_3);
      FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_3);
      int_ idx_0 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data;
      int_ t_0;
      if (idx_0 >= 0) {
         t_0 = idx_0;
      }
      else if (_fx_g19Ast__lock_all_names == 0) {
         fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &v_13);
         int_ sz_0 = FX_ARR_SIZE(v_13, 0);
         int_ n0_0 = _fx_g14Ast__all_names->u.t.t0;
         if (sz_0 <= n0_0) {
            int_ n1_0 = fx_maxi(n0_0, 128) * 2;
            fx_copy_arr(&_fx_g14Ast__all_names->u.t.t1, &old_data_0);
            fx_copy_str(&_fx_g14Ast__all_names->u.t.t2, &val0_0);
            fx_str_t* dstptr_0 = 0;
            {
               const int_ shape_0[] = { n1_0 };
               FX_CALL(
                  fx_make_arr(1, shape_0, sizeof(fx_str_t), (fx_free_t)fx_free_str, (fx_copy_t)fx_copy_str, 0, &new_data_0),
                  _fx_catch_3);
            }
            dstptr_0 = (fx_str_t*)new_data_0.data;
            for (int_ i_3 = 0; i_3 < n1_0; i_3++, dstptr_0++) {
               fx_str_t t_1 = {0};
               if (i_3 < n0_0) {
                  FX_CHKIDX(FX_CHKIDX1(old_data_0, 0, i_3), _fx_catch_1);
                  fx_copy_str(FX_PTR_1D(fx_str_t, old_data_0, i_3), &t_1);
               }
               else {
                  fx_copy_str(&val0_0, &t_1);
               }
               fx_copy_str(&t_1, dstptr_0);

            _fx_catch_1: ;
               FX_FREE_STR(&t_1);
               FX_CHECK_EXN(_fx_catch_3);
            }
            fx_arr_t* v_17 = &_fx_g14Ast__all_names->u.t.t1;
            FX_FREE_ARR(v_17);
            fx_copy_arr(&new_data_0, v_17);
         }
         _fx_g14Ast__all_names->u.t.t0 = n0_0 + 1;
         FX_CHKIDX(FX_CHKIDX1(_fx_g14Ast__all_names->u.t.t1, 0, n0_0), _fx_catch_3);
         fx_str_t* v_18 = FX_PTR_1D(fx_str_t, _fx_g14Ast__all_names->u.t.t1, n0_0);
         FX_FREE_STR(v_18);
         fx_copy_str(i_2, v_18);
         FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_strhash->u.t.t5, 0, h_idx_0), _fx_catch_3);
         FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, _fx_g16Ast__all_strhash->u.t.t5, h_idx_0)->data = n0_0;
         t_0 = n0_0;
      }
      else {
         if (_fx_g10Ast__noloc.m_idx >= 0) {
            int_ v_19 = _fx_g10Ast__noloc.m_idx;
            FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, v_19), _fx_catch_3);
            fx_copy_str(&(*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, v_19))->u.defmodule_t.t1, &fname_0);
         }
         else {
            fx_str_t slit_0 = FX_MAKE_STR("unknown"); fx_copy_str(&slit_0, &fname_0);
         }
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.line0, &v_14, 0), _fx_catch_3);
         FX_CALL(_fx_F6stringS1i(_fx_g10Ast__noloc.col0, &v_15, 0), _fx_catch_3);
         fx_str_t slit_1 = FX_MAKE_STR(":");
         fx_str_t slit_2 = FX_MAKE_STR(":");
         fx_str_t slit_3 = FX_MAKE_STR(": error: \'all_names\' are locked. Attempt to call get_id()");
         {
            const fx_str_t strs_0[] = { fname_0, slit_1, v_14, slit_2, v_15, slit_3 };
            FX_CALL(fx_strjoin(0, 0, 0, strs_0, 6, &whole_msg_0), _fx_catch_3);
         }
         FX_COPY_PTR(_fx_g24Ast__all_compile_err_ctx, &all_compile_err_ctx_0);
         if (all_compile_err_ctx_0 == 0) {
            fx_copy_str(&whole_msg_0, &whole_msg_1);
         }
         else {
            _fx_LS v_20 = 0;
            FX_CALL(_fx_cons_LS(&whole_msg_0, all_compile_err_ctx_0, true, &v_20), _fx_catch_2);
            fx_str_t slit_4 =
               FX_MAKE_STR("\n"
                  U"\t");
            FX_CALL(_fx_F4joinS2SLS(&slit_4, v_20, &whole_msg_1, 0), _fx_catch_2);

         _fx_catch_2: ;
            if (v_20) {
               _fx_free_LS(&v_20);
            }
         }
         FX_CHECK_EXN(_fx_catch_3);
         FX_CALL(_fx_M3AstFM17make_CompileErrorE2RM5loc_tS(&_fx_g10Ast__noloc, &whole_msg_1, &v_16), _fx_catch_3);
         FX_THROW(&v_16, true, _fx_catch_3);
      }

   _fx_catch_3: ;
      fx_free_exn(&v_16);
      FX_FREE_STR(&whole_msg_1);
      if (all_compile_err_ctx_0) {
         _fx_free_LS(&all_compile_err_ctx_0);
      }
      FX_FREE_STR(&whole_msg_0);
      FX_FREE_STR(&v_15);
      FX_FREE_STR(&v_14);
      FX_FREE_STR(&fname_0);
      FX_FREE_ARR(&new_data_0);
      FX_FREE_STR(&val0_0);
      FX_FREE_ARR(&old_data_0);
      FX_FREE_ARR(&v_13);
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_CALL(_fx_M3AstFM19fname_always_importLRM4id_t0(&res_0, 0), _fx_cleanup);
   _fx_copy_Rt20Hashmap__hashentry_t2Si(&_fx_g21Ast__all_modules_hash->u.t.t0, &entry0_2);
   fx_copy_arr(&_fx_g21Ast__all_modules_hash->u.t.t5, &table_2);
   int_ v_21 = FX_ARR_SIZE(table_2, 0);
   FX_CHKIDX_RANGE(FX_ARR_SIZE(table_2, 0), 0, v_21, 1, 1, 0, _fx_cleanup);
   _fx_Rt20Hashmap__hashentry_t2Si* ptr_2 = FX_PTR_1D(_fx_Rt20Hashmap__hashentry_t2Si, table_2, 0);
   for (int_ i_4 = 0; i_4 < v_21; i_4++) {
      _fx_Rt20Hashmap__hashentry_t2Si* v_22 = ptr_2 + i_4;
      _fx_free_Rt20Hashmap__hashentry_t2Si(v_22);
      _fx_copy_Rt20Hashmap__hashentry_t2Si(&entry0_2, v_22);
   }
   _fx_g21Ast__all_modules_hash->u.t.t1 = 0;
   _fx_g21Ast__all_modules_hash->u.t.t2 = 0;
   _fx_g21Ast__all_modules_hash->u.t.t3 = 0;
   FX_CALL(_fx_M7HashmapFM9makeindexA1i1i(FX_ARR_SIZE(table_2, 0) * 2, &v_4, 0), _fx_cleanup);
   fx_arr_t* v_23 = &_fx_g21Ast__all_modules_hash->u.t.t4;
   FX_FREE_ARR(v_23);
   fx_copy_arr(&v_4, v_23);
   FX_FREE_ARR(&_fx_g16Ast__all_modules);
   fx_copy_arr(&z_1, &_fx_g16Ast__all_modules);
   fx_str_t slit_5 = FX_MAKE_STR("<Names>");
   int_ res_1;
   FX_CALL(_fx_M3AstFM11find_modulei2RM4id_tS(&_fx_g17Ast__std__Names__, &slit_5, &res_1, 0), _fx_cleanup);
   fx_str_t slit_6 = FX_MAKE_STR("<Runtime>");
   int_ res_2;
   FX_CALL(_fx_M3AstFM11find_modulei2RM4id_tS(&_fx_g19Ast__std__Runtime__, &slit_6, &res_2, 0), _fx_cleanup);
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, 0), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, 0))->u.defmodule_t.t3 = false;
   FX_CHKIDX(FX_CHKIDX1(_fx_g16Ast__all_modules, 0, 1), _fx_cleanup);
   (*FX_PTR_1D(_fx_N16Ast__defmodule_t, _fx_g16Ast__all_modules, 1))->u.defmodule_t.t3 = false;
   FX_FREE_LIST_SIMPLE(&_fx_g23Ast__all_modules_sorted);
   _fx_g23Ast__all_modules_sorted = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_0 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_0, &cmp_id_0);
   _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(_fx_g10Ast__Empty, &cmp_id_0, &v_5);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&_fx_g23Ast__builtin_exceptions);
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_5, &_fx_g23Ast__builtin_exceptions);
   _fx_free_LE(&_fx_g21Ast__all_compile_errs);
   _fx_g21Ast__all_compile_errs = 0;
   _fx_free_LS(&_fx_g24Ast__all_compile_err_ctx);
   _fx_g24Ast__all_compile_err_ctx = 0;

_fx_cleanup: ;
   FX_FREE_ARR(&z_0);
   _fx_free_Rt20Hashmap__hashentry_t2Si(&entry0_0);
   FX_FREE_ARR(&table_0);
   FX_FREE_ARR(&v_0);
   _fx_free_Rt24Hashset__hashset_entry_t1S(&entry0_1);
   FX_FREE_ARR(&table_1);
   FX_FREE_ARR(&v_1);
   if (v_2) {
      _fx_free_LS(&v_2);
   }
   if (__fold_result___0) {
      _fx_free_LS(&__fold_result___0);
   }
   if (v_3) {
      _fx_free_LS(&v_3);
   }
   FX_FREE_LIST_SIMPLE(&res_0);
   _fx_free_Rt20Hashmap__hashentry_t2Si(&entry0_2);
   FX_FREE_ARR(&table_2);
   FX_FREE_ARR(&v_4);
   FX_FREE_ARR(&z_1);
   FX_FREE_FP(&cmp_id_0);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_5);
   return fx_status;
}

FX_EXTERN_C int fx_init_Ast(void)
{
   _fx_T2R9Ast__id_tT2LSi _fx_g6Ast__v = {0};
   fx_arr_t z_0 = {0};
   _fx_LS v_0 = 0;
   _fx_Rt6Set__t1S res_0 = {0};
   _fx_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t v_1 = 0;
   _fx_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t v_2 = 0;
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v1_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v2_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v3_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v4_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v5_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v6_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v7_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v8_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g8Ast__v9_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v10_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v11_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v12_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v13_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v14_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v15_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v16_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v17_ = {0};
   _fx_T2R9Ast__id_tT2LSi _fx_g9Ast__v18_ = {0};
   FX_REG_EXN("Ast.CompileError", _FX_EXN_E17Ast__CompileError, _fx_E17Ast__CompileError_info, _fx_free_E17Ast__CompileError);
   FX_REG_SIMPLE_EXN("Ast.PropagateCompileError", _FX_EXN_E26Ast__PropagateCompileError, _fx_E26Ast__PropagateCompileError_info,
      _fx_E26Ast__PropagateCompileErrorv);
   int fx_status = 0;
   _fx_make_T2LSi(0, 0, &_fx_g16Ast__builtin_ids);
   fx_str_t slit_0 = FX_MAKE_STR("<noid>");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_0, &_fx_g16Ast__builtin_ids, &_fx_g6Ast__v, 0), _fx_cleanup);
   _fx_g9Ast__noid = _fx_g6Ast__v.t0;
   _fx_copy_T2LSi(&_fx_g6Ast__v.t1, &_fx_g18Ast__builtin_ids1_);
   _fx_R10Ast__loc_t rec_0 = { -1, 0, 0, 0, 0 };
   _fx_g10Ast__noloc = rec_0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_0 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_0, &_fx_g11Ast__cmp_id);
   FX_CALL(
      _fx_M3AstFM5emptyRt6Map__t2RM4id_tLN16Ast__env_entry_t1FPi2RM4id_tRM4id_t(&_fx_g11Ast__cmp_id, &_fx_g14Ast__empty_env, 0),
      _fx_cleanup);
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_1 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_1, &_fx_g13Ast__cmp_id1_);
   FX_CALL(_fx_M3AstFM5emptyRt6Set__t1RM4id_t1FPi2RM4id_tRM4id_t(&_fx_g13Ast__cmp_id1_, &_fx_g16Ast__empty_idset, 0),
      _fx_cleanup);
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_2 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_2, &_fx_g13Ast__cmp_id2_);
   FX_CALL(_fx_M3AstFM5emptyRt6Map__t2RM4id_tRM4id_t1FPi2RM4id_tRM4id_t(&_fx_g13Ast__cmp_id2_, &_fx_g16Ast__empty_idmap, 0),
      _fx_cleanup);
   fx_str_t slit_1 = FX_MAKE_STR("");
   FX_CALL(_fx_M3AstFM6createNt9Dynvec__t1S2iS(0, &slit_1, &_fx_g14Ast__all_names, 0), _fx_cleanup);
   fx_str_t slit_2 = FX_MAKE_STR("");
   FX_CALL(_fx_M3AstFM5emptyNt10Hashmap__t2Si3iSi(1024, &slit_2, -1, &_fx_g16Ast__all_strhash, 0), _fx_cleanup);
   fx_str_t slit_3 = FX_MAKE_STR("");
   FX_CALL(_fx_M3AstFM5emptyNt10Hashmap__t2Si3iSi(1024, &slit_3, -1, &_fx_g21Ast__all_modules_hash, 0), _fx_cleanup);
   fx_copy_arr(&z_0, &_fx_g16Ast__all_modules);
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&_fx_g16Ast__empty_idmap, &_fx_g23Ast__builtin_exceptions);
   fx_str_t slit_4 = FX_MAKE_STR("");
   FX_CALL(_fx_M3AstFM5emptyNt10Hashset__t1S2iS(256, &slit_4, &_fx_g19Ast__all_c_inc_dirs, 0), _fx_cleanup);
   fx_str_t slit_5 = FX_MAKE_STR("fx_fv");
   FX_CALL(_fx_cons_LS(&slit_5, 0, true, &v_0), _fx_cleanup);
   fx_str_t slit_6 = FX_MAKE_STR("fx_status");
   FX_CALL(_fx_cons_LS(&slit_6, v_0, false, &v_0), _fx_cleanup);
   fx_str_t slit_7 = FX_MAKE_STR("fx_result");
   FX_CALL(_fx_cons_LS(&slit_7, v_0, false, &v_0), _fx_cleanup);
   _fx_FPi2SS cmp_fp_0 = { _fx_M3AstFM3cmpi2SS, 0 };
   FX_COPY_FP(&cmp_fp_0, &_fx_g8Ast__cmp);
   FX_CALL(_fx_M3AstFM9from_listRt6Set__t1S2FPi2SSLS(&_fx_g8Ast__cmp, v_0, &res_0, 0), _fx_cleanup);
   _fx_FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t dup_typ__fp_0 =
      { _fx_M3AstFM8dup_typ_N10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t, 0 };
   FX_COPY_FP(&dup_typ__fp_0, &_fx_g13Ast__dup_typ_);
   FX_CALL(
      _fx_M3AstFM4SomeNt6option1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t1FPN10Ast__typ_t2N10Ast__typ_tRM11ast_callb_t(
         &_fx_g13Ast__dup_typ_, &v_1), _fx_cleanup);
   _fx_FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t dup_exp__fp_0 =
      { _fx_M3AstFM8dup_exp_N10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t, 0 };
   FX_COPY_FP(&dup_exp__fp_0, &_fx_g13Ast__dup_exp_);
   FX_CALL(
      _fx_M3AstFM4SomeNt6option1FPN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t1FPN10Ast__exp_t2N10Ast__exp_tRM11ast_callb_t(
         &_fx_g13Ast__dup_exp_, &v_2), _fx_cleanup);
   _fx_make_R16Ast__ast_callb_t(v_1, v_2, _fx_g11Ast__None1_, &_fx_g14Ast__dup_callb);
   fx_str_t slit_8 = FX_MAKE_STR("_");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_8, &_fx_g18Ast__builtin_ids1_, &_fx_g8Ast__v1_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g8Ast__v1_.t1, &_fx_g18Ast__builtin_ids2_);
   fx_str_t slit_9 = FX_MAKE_STR("__fold_result__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_9, &_fx_g18Ast__builtin_ids2_, &_fx_g8Ast__v2_, 0), _fx_cleanup);
   _fx_g23Ast__std__fold_result__ = _fx_g8Ast__v2_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v2_.t1, &_fx_g18Ast__builtin_ids3_);
   fx_str_t slit_10 = FX_MAKE_STR("__tag__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_10, &_fx_g18Ast__builtin_ids3_, &_fx_g8Ast__v3_, 0), _fx_cleanup);
   _fx_g15Ast__std__tag__ = _fx_g8Ast__v3_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v3_.t1, &_fx_g18Ast__builtin_ids4_);
   fx_str_t slit_11 = FX_MAKE_STR("self");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_11, &_fx_g18Ast__builtin_ids4_, &_fx_g8Ast__v4_, 0), _fx_cleanup);
   _fx_g16Ast__std__self__ = _fx_g8Ast__v4_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v4_.t1, &_fx_g18Ast__builtin_ids5_);
   fx_str_t slit_12 = FX_MAKE_STR("__lambda__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_12, &_fx_g18Ast__builtin_ids5_, &_fx_g8Ast__v5_, 0), _fx_cleanup);
   _fx_g18Ast__std__lambda__ = _fx_g8Ast__v5_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v5_.t1, &_fx_g18Ast__builtin_ids6_);
   fx_str_t slit_13 = FX_MAKE_STR("__kwargs__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_13, &_fx_g18Ast__builtin_ids6_, &_fx_g8Ast__v6_, 0), _fx_cleanup);
   _fx_g18Ast__std__kwargs__ = _fx_g8Ast__v6_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v6_.t1, &_fx_g18Ast__builtin_ids7_);
   fx_str_t slit_14 = FX_MAKE_STR("__pat__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_14, &_fx_g18Ast__builtin_ids7_, &_fx_g8Ast__v7_, 0), _fx_cleanup);
   _fx_g15Ast__std__pat__ = _fx_g8Ast__v7_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v7_.t1, &_fx_g18Ast__builtin_ids8_);
   fx_str_t slit_15 = FX_MAKE_STR("result");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_15, &_fx_g18Ast__builtin_ids8_, &_fx_g8Ast__v8_, 0), _fx_cleanup);
   _fx_g18Ast__std__result__ = _fx_g8Ast__v8_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v8_.t1, &_fx_g18Ast__builtin_ids9_);
   fx_str_t slit_16 = FX_MAKE_STR("size");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_16, &_fx_g18Ast__builtin_ids9_, &_fx_g8Ast__v9_, 0), _fx_cleanup);
   _fx_g16Ast__std__size__ = _fx_g8Ast__v9_.t0;
   _fx_copy_T2LSi(&_fx_g8Ast__v9_.t1, &_fx_g19Ast__builtin_ids10_);
   fx_str_t slit_17 = FX_MAKE_STR("t");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_17, &_fx_g19Ast__builtin_ids10_, &_fx_g9Ast__v10_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v10_.t1, &_fx_g19Ast__builtin_ids11_);
   fx_str_t slit_18 = FX_MAKE_STR("__Names__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_18, &_fx_g19Ast__builtin_ids11_, &_fx_g9Ast__v11_, 0), _fx_cleanup);
   _fx_g17Ast__std__Names__ = _fx_g9Ast__v11_.t0;
   _fx_copy_T2LSi(&_fx_g9Ast__v11_.t1, &_fx_g19Ast__builtin_ids12_);
   fx_str_t slit_19 = FX_MAKE_STR("__Runtime__");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_19, &_fx_g19Ast__builtin_ids12_, &_fx_g9Ast__v12_, 0), _fx_cleanup);
   _fx_g19Ast__std__Runtime__ = _fx_g9Ast__v12_.t0;
   _fx_copy_T2LSi(&_fx_g9Ast__v12_.t1, &_fx_g19Ast__builtin_ids13_);
   fx_str_t slit_20 = FX_MAKE_STR("Builtins");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_20, &_fx_g19Ast__builtin_ids13_, &_fx_g9Ast__v13_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v13_.t1, &_fx_g19Ast__builtin_ids14_);
   fx_str_t slit_21 = FX_MAKE_STR("List");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_21, &_fx_g19Ast__builtin_ids14_, &_fx_g9Ast__v14_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v14_.t1, &_fx_g19Ast__builtin_ids15_);
   fx_str_t slit_22 = FX_MAKE_STR("String");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_22, &_fx_g19Ast__builtin_ids15_, &_fx_g9Ast__v15_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v15_.t1, &_fx_g19Ast__builtin_ids16_);
   fx_str_t slit_23 = FX_MAKE_STR("Char");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_23, &_fx_g19Ast__builtin_ids16_, &_fx_g9Ast__v16_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v16_.t1, &_fx_g19Ast__builtin_ids17_);
   fx_str_t slit_24 = FX_MAKE_STR("Array");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_24, &_fx_g19Ast__builtin_ids17_, &_fx_g9Ast__v17_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v17_.t1, &_fx_g19Ast__builtin_ids18_);
   fx_str_t slit_25 = FX_MAKE_STR("Vector");
   FX_CALL(_fx_M3AstFM6std_idT2RM4id_tT2LSi2ST2LSi(&slit_25, &_fx_g19Ast__builtin_ids18_, &_fx_g9Ast__v18_, 0), _fx_cleanup);
   _fx_copy_T2LSi(&_fx_g9Ast__v18_.t1, &_fx_g19Ast__builtin_ids19_);

_fx_cleanup: ;
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g6Ast__v);
   FX_FREE_ARR(&z_0);
   if (v_0) {
      _fx_free_LS(&v_0);
   }
   _fx_free_Rt6Set__t1S(&res_0);
   if (v_1) {
      _fx_free_Nt6option1FPN10Ast__typ_t2N10Ast__typ_tR16Ast__ast_callb_t(&v_1);
   }
   if (v_2) {
      _fx_free_Nt6option1FPN10Ast__exp_t2N10Ast__exp_tR16Ast__ast_callb_t(&v_2);
   }
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v1_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v2_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v3_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v4_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v5_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v6_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v7_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v8_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g8Ast__v9_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v10_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v11_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v12_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v13_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v14_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v15_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v16_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v17_);
   _fx_free_T2R9Ast__id_tT2LSi(&_fx_g9Ast__v18_);
   return fx_status;
}

FX_EXTERN_C void fx_deinit_Ast(void)
{
   _fx_free_T2LSi(&_fx_g16Ast__builtin_ids);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids1_);
   FX_FREE_FP(&_fx_g11Ast__cmp_id);
   _fx_free_Rt6Map__t2R9Ast__id_tLN16Ast__env_entry_t(&_fx_g14Ast__empty_env);
   FX_FREE_FP(&_fx_g13Ast__cmp_id1_);
   _fx_free_Rt6Set__t1R9Ast__id_t(&_fx_g16Ast__empty_idset);
   FX_FREE_FP(&_fx_g13Ast__cmp_id2_);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&_fx_g16Ast__empty_idmap);
   if (_fx_g14Ast__all_names) {
      _fx_free_Nt9Dynvec__t1S(&_fx_g14Ast__all_names);
   }
   if (_fx_g16Ast__all_strhash) {
      _fx_free_Nt10Hashmap__t2Si(&_fx_g16Ast__all_strhash);
   }
   if (_fx_g21Ast__all_modules_hash) {
      _fx_free_Nt10Hashmap__t2Si(&_fx_g21Ast__all_modules_hash);
   }
   FX_FREE_ARR(&_fx_g16Ast__all_modules);
   FX_FREE_LIST_SIMPLE(&_fx_g23Ast__all_modules_sorted);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&_fx_g23Ast__builtin_exceptions);
   if (_fx_g21Ast__all_compile_errs) {
      _fx_free_LE(&_fx_g21Ast__all_compile_errs);
   }
   if (_fx_g24Ast__all_compile_err_ctx) {
      _fx_free_LS(&_fx_g24Ast__all_compile_err_ctx);
   }
   if (_fx_g17Ast__all_func_ctx) {
      _fx_free_LT3R9Ast__id_tN10Ast__typ_tR10Ast__loc_t(&_fx_g17Ast__all_func_ctx);
   }
   if (_fx_g19Ast__all_c_inc_dirs) {
      _fx_free_Nt10Hashset__t1S(&_fx_g19Ast__all_c_inc_dirs);
   }
   FX_FREE_FP(&_fx_g8Ast__cmp);
   FX_FREE_FP(&_fx_g13Ast__dup_typ_);
   FX_FREE_FP(&_fx_g13Ast__dup_exp_);
   _fx_free_R16Ast__ast_callb_t(&_fx_g14Ast__dup_callb);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids2_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids3_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids4_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids5_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids6_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids7_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids8_);
   _fx_free_T2LSi(&_fx_g18Ast__builtin_ids9_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids10_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids11_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids12_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids13_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids14_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids15_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids16_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids17_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids18_);
   _fx_free_T2LSi(&_fx_g19Ast__builtin_ids19_);
}

